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
32 lines
710 B
YAML
32 lines
710 B
YAML
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
|