1- name : Publish wiki
1+ name : Documentation
2+
23on :
3- workflow_dispatch :
4- branches : [main]
4+ push :
5+ branches :
6+ - main
57 paths :
6- - wiki
7- - .github/workflows/publish-wiki.yml
8- concurrency :
9- group : publish-wiki
10- cancel-in-progress : true
11- permissions :
12- contents : write
8+ - " docs/**"
9+ repository_dispatch :
10+ types : [docs]
11+ gollum :
12+
13+ env :
14+ GIT_AUTHOR_NAME : Actionbot
15+ GIT_AUTHOR_EMAIL : actions@github.com
16+ SYNC_CHANGES_REPO_NAME : docs-sync
17+
1318jobs :
14- publish -wiki :
19+ job-sync-docs-to -wiki :
1520 runs-on : ubuntu-latest
21+ if : github.event_name != 'gollum'
1622 steps :
17- - uses : actions/checkout@v3
18- - uses : impresscms-dev/strip-markdown-extensions-from-links-action@v1.0.0
23+ - name : Checkout Repo
24+ uses : actions/checkout@v2
25+ - name : Sync docs to wiki
26+ uses : UnitTestBot/wiki-sync-action@main
1927 with :
20- path : wiki
21- - uses : Andrew-Chen-Wang/github-wiki-action@v4
28+ source : docs
29+ destination : wiki
30+ token : ${{ secrets.ACCESS_TOKEN }}
31+ gitAuthorName : ${{ env.GIT_AUTHOR_NAME }}
32+ gitAuthorEmail : ${{ env.GIT_AUTHOR_EMAIL }}
33+
34+ job-sync-wiki-to-docs :
35+ runs-on : ubuntu-latest
36+ if : github.event_name == 'gollum'
37+ steps :
38+ - name : Checkout Repo
39+ uses : actions/checkout@v2
40+ with :
41+ token : ${{ secrets.ACCESS_TOKEN }} # allows us to push back to repo
42+ - name : Sync Wiki to Docs
43+ uses : UnitTestBot/wiki-sync-action@main
44+ with :
45+ source : wiki
46+ destination : docs
47+ token : ${{ secrets.ACCESS_TOKEN }}
48+ gitAuthorName : ${{ env.GIT_AUTHOR_NAME }}
49+ gitAuthorEmail : ${{ env.GIT_AUTHOR_EMAIL }}
50+ branch : wiki_branch
51+ - name : Create PR for success
52+ run : |
53+ BRANCH="$(git rev-parse --abbrev-ref HEAD)"
54+ if [[ "$BRANCH" != "main" ]]; then
55+ gh pr create --fill
56+ fi
57+ env :
58+ GH_TOKEN : ${{ secrets.ACCESS_TOKEN }}
0 commit comments