File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Sync docs to Wiki
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ paths :
7+ - ' docs/**'
8+
9+ jobs :
10+ sync :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+ with :
16+ fetch-depth : 0
17+
18+ - name : Configure git
19+ run : |
20+ git config --global user.name "github-actions[bot]"
21+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
22+
23+ - name : Clone GitHub Wiki
24+ run : |
25+ git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki
26+
27+ - name : Sync docs to wiki
28+ run : |
29+ rsync -av --delete docs/ wiki/
30+ cd wiki
31+ git add -A
32+ if [ -n "$(git status --porcelain)" ]; then
33+ git commit -m "Sync docs from repository"
34+ git push origin HEAD
35+ else
36+ echo "No changes to commit"
37+ fi
You can’t perform that action at this time.
0 commit comments