Add the wiki publishing workflow
Validate workflows / validate (pull_request) Successful in 15s

Add tools/publish_wiki.py and the Publish wiki workflow, which make the
Gitea wiki equal wiki/ through the wiki REST API when a change to wiki/ is
merged to main. It needs its own secret TOKEN_FOR_GITEA_WIKI, refuses an
empty source and checks that the English pages are current first.

Document the secret in the credentials and troubleshooting guides and
regenerate the affected wiki pages.

Task: MIL-005#8
This commit is contained in:
2026-10-10 09:06:13 +08:00
parent 334b214a12
commit 1472513421
9 changed files with 585 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
name: Publish wiki
on:
push:
branches: [ main ]
paths:
- "wiki/**"
workflow_dispatch:
concurrency:
group: publish-wiki
cancel-in-progress: false
jobs:
publish-wiki:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Check that the English pages are current
run: python3 tools/build_wiki.py --check
- name: Publish the pages to the wiki
env:
GITEA_API_URL: ${{ gitea.api_url }}
SOURCE_REPOSITORY: ${{ gitea.repository }}
WIKI_CREDENTIALS: ${{ secrets.TOKEN_FOR_GITEA_WIKI }}
run: python3 tools/publish_wiki.py