Skip to content

Commit 4925bb2

Browse files
committed
[wiki] Allow automatic synchronization of user manual to Github wiki page
1 parent 0916e45 commit 4925bb2

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/sync_wiki.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync User Manual to Wiki
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'docs/user_manual.md'
8+
workflow_dispatch:
9+
10+
jobs:
11+
sync-wiki:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout repo
18+
uses: actions/checkout@v4
19+
20+
- name: Push user_manual.md to Wiki
21+
run: |
22+
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki
23+
cp docs/user_manual.md wiki/Home.md
24+
cd wiki
25+
git config user.name "github-actions[bot]"
26+
git config user.email "github-actions[bot]@users.noreply.github.com"
27+
git add Home.md
28+
git diff --staged --quiet || git commit -m "docs: sync user manual from docs/user_manual.md"
29+
git push

0 commit comments

Comments
 (0)