forked from fabiangreffrath/woof
-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (37 loc) · 1.13 KB
/
update_wiki.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Update Wiki
on:
push:
branches: [ master ]
tags: ['*']
workflow_dispatch:
jobs:
update-wiki:
if: ${{ github.repository == 'MrAlaux/Nugget-Doom' }}
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: code
- name: Checkout wiki
uses: actions/checkout@v4
with:
repository: ${{github.repository}}.wiki
path: wiki
- name: Generate files
run: |
python3 "./code/man/docgen" -M "./code/man/CMDLINE.template.md" \
"./code/src/" > "./wiki/Command-Line-Parameters.md"
cp -af "./code/docs/cheats.md" "./wiki/Cheats.md"
cp -af "./code/docs/nughud.md" "./wiki/NUGHUD.md" # [Nugget]
- name: Push to wiki
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
cd wiki
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git diff-index --quiet HEAD || git commit -m "Update wiki" && git push