Skip to content

Commit f06a87a

Browse files
committed
docs: document wiki sync workflow
1 parent 501e9ed commit f06a87a

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

docs/ci-cd/wiki-sync.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Wiki Sync
2+
3+
The GitHub Wiki is a separate git repository. Files under this repository's `wiki/` folder do not appear in the actual Wiki tab until they are pushed to the wiki repository.
4+
5+
## Current solution
6+
7+
This repo includes `.github/workflows/sync-wiki.yml`.
8+
9+
Run it manually from GitHub Actions:
10+
11+
1. Open Actions.
12+
2. Select `sync-wiki`.
13+
3. Click `Run workflow`.
14+
4. Check that the Wiki tab shows the pages.
15+
16+
## If the default token cannot push
17+
18+
Create a repository secret named `WIKI_TOKEN` with permission to write repository contents and wiki pages, then run the workflow again.
19+
20+
## Wiki source
21+
22+
Canonical wiki source files live in:
23+
24+
```text
25+
wiki/
26+
```
27+
28+
## Sync loop
29+
30+
```mermaid
31+
flowchart TD
32+
Edit[Edit repo wiki folder] --> Commit[Commit to main]
33+
Commit --> Workflow[sync-wiki workflow]
34+
Workflow --> Clone[Clone wiki git repo]
35+
Clone --> Copy[Copy pages]
36+
Copy --> Push[Push to actual GitHub Wiki]
37+
Push --> Verify[Open Wiki tab]
38+
Verify --> Done{Pages visible?}
39+
Done -- No --> Token[Check token or WIKI_TOKEN]
40+
Token --> Workflow
41+
Done -- Yes --> Complete[Complete]
42+
```

0 commit comments

Comments
 (0)