posspack/.forgejo/workflows/update-wiki.yaml

45 lines
1.1 KiB
YAML
Raw Normal View History

2024-07-27 14:18:02 +02:00
on: [push]
2024-07-27 14:37:29 +02:00
name: "Update wiki"
2024-07-27 14:18:02 +02:00
jobs:
test:
2024-07-27 14:23:23 +02:00
runs-on: ubuntu-latest
2024-07-27 14:18:02 +02:00
steps:
2024-07-27 14:36:28 +02:00
- name: "Clone modpack"
2024-07-27 14:34:31 +02:00
uses: actions/checkout@v3
2024-07-27 14:31:45 +02:00
with:
2024-07-27 14:34:31 +02:00
repository: "root/posspack"
2024-07-27 14:31:45 +02:00
path: "pack"
2024-07-27 14:36:28 +02:00
- name: "Clone wiki"
2024-07-27 14:34:31 +02:00
uses: actions/checkout@v3
2024-07-27 14:31:45 +02:00
with:
2024-07-27 14:34:31 +02:00
repository: "root/posspack.wiki"
2024-07-27 14:39:19 +02:00
path: "wiki"
2024-07-27 14:36:54 +02:00
ref: "main"
2024-07-27 14:31:45 +02:00
2024-08-01 01:21:44 +02:00
- name: Restore cached licenses
id: cache-licenses-restore
uses: actions/cache/restore@v4
with:
path: licenses.json
2024-08-01 01:31:19 +02:00
key: licenses
2024-08-01 01:21:44 +02:00
2024-07-27 14:36:28 +02:00
- name: "Update modlist"
2024-07-27 14:37:48 +02:00
run: python pack/.forgejo/scripts/update-wiki.py
2024-07-27 14:34:31 +02:00
2024-08-01 01:21:44 +02:00
- name: Save cached licenses
2024-08-01 01:30:29 +02:00
id: cache-licenses-save
2024-08-01 01:21:44 +02:00
uses: actions/cache/save@v4
with:
path: licenses.json
2024-08-01 01:30:55 +02:00
key: ${{ steps.cache-licenses-restore.outputs.cache-primary-key }}
2024-08-01 01:21:44 +02:00
2024-07-27 14:36:28 +02:00
- name: "Commit changes"
2024-07-27 14:34:31 +02:00
run: |
2024-07-27 14:38:52 +02:00
cd wiki
2024-07-27 14:40:49 +02:00
git add .
2024-07-27 14:36:28 +02:00
git config --global user.name 'PossPack Wiki Updater'
2024-07-27 14:38:52 +02:00
git config --global user.email 'root@possum.city'
git commit -am "Automated wiki update"
2024-07-27 14:34:31 +02:00
git push