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
43
name: Publish wiki
on:
push:
branches:
paths:
workflow_dispatch:
permissions:
contents: write
jobs:
publish-wiki:
name: Sync wiki pages
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
path: repo
- name: Checkout wiki
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
repository: blueokanna/Tzcraft.wiki
token: ${{ secrets.GITHUB_TOKEN }}
path: wiki
- name: Copy staging pages into the wiki
run: cp -r repo/wiki/. wiki/
- name: Commit and push
run: |
cd wiki
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --cached --quiet; then
echo "No wiki changes; nothing to push."
else
git commit -m "Sync wiki pages from main"
git push
fi