48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
on: [push]
|
|
name: "Update wiki"
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "[TEMP] Add cache"
|
|
run: |
|
|
mkdir cache
|
|
|
|
- name: "Clone modpack"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: "root/posspack"
|
|
path: "pack"
|
|
|
|
- name: "Clone wiki"
|
|
uses: actions/checkout@v3
|
|
with:
|
|
repository: "root/posspack.wiki"
|
|
path: "wiki"
|
|
ref: "main"
|
|
|
|
- name: Restore cached licenses
|
|
id: cache-licenses-restore
|
|
uses: actions/cache/restore@v4
|
|
with:
|
|
path: cache
|
|
key: licenses
|
|
|
|
- name: "Update modlist"
|
|
run: python pack/.forgejo/scripts/update-wiki.py
|
|
|
|
- name: Save cached licenses
|
|
id: cache-licenses-save
|
|
uses: actions/cache/save@v4
|
|
with:
|
|
path: cache
|
|
key: ${{ steps.cache-licenses-restore.outputs.cache-primary-key }}
|
|
|
|
- name: "Commit changes"
|
|
run: |
|
|
cd wiki
|
|
git add .
|
|
git config --global user.name 'PossPack Wiki Updater'
|
|
git config --global user.email 'root@possum.city'
|
|
git commit -am "Automated wiki update"
|
|
git push
|