Skip to content

Commit db7c6de

Browse files
authored
Updated workflow for bidirectional wiki-docs syncing (#646)
1 parent d6f1457 commit db7c6de

File tree

132 files changed

+52
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+52
-15
lines changed

.github/workflows/docs-to-wiki.yml

Lines changed: 52 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,58 @@
1-
name: Publish wiki
1+
name: Documentation
2+
23
on:
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: [email protected]
16+
SYNC_CHANGES_REPO_NAME: docs-sync
17+
1318
jobs:
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/[email protected]
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 Uncyclo 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 }}

wiki/faq.md renamed to docs/faq.md

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)