Files
OpenUniFi/.gitea/workflows/documentation.yaml
T
Koda f5d14b0a79
Generate and publish developer Wiki / generated-wiki (pull_request) Successful in 14s
fixing wiki generation
2026-07-19 21:32:10 +00:00

58 lines
1.8 KiB
YAML

name: Generate and publish developer Wiki
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: openunifi-wiki
cancel-in-progress: false
permissions:
code: read
jobs:
generated-wiki:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v4
with:
fetch-depth: 2
path: source
- name: Check patch whitespace
run: git -C source diff --check HEAD^ HEAD
- name: Validate documentation generator
run: |
mkdir -p "$RUNNER_TEMP/openuf-wiki"
python3 source/scripts/docs/generate-wiki.py --output "$RUNNER_TEMP/openuf-wiki"
python3 source/scripts/docs/generate-wiki.py --check --output "$RUNNER_TEMP/openuf-wiki"
- name: Check out Wiki repository
if: github.event_name != 'pull_request'
uses: actions/checkout@v4
with:
repository: Koda/openunifi.wiki
token: ${{ secrets.GITEA_TOKEN }}
path: wiki
- name: Generate and verify Gitea Wiki pages
if: github.event_name != 'pull_request'
run: |
python3 source/scripts/docs/generate-wiki.py --output wiki
python3 source/scripts/docs/generate-wiki.py --check --output wiki
- name: Publish changed Wiki pages
if: github.event_name != 'pull_request'
working-directory: wiki
run: |
set -eu
git config user.name "openUF documentation bot"
git config user.email "actions@openuf.invalid"
git add -- Home.md Developer-Guide.md Call-Graph.md Runtime-Flow.md _Sidebar.md
if git diff --cached --quiet; then
echo "Gitea Wiki is already current"
exit 0
fi
git commit -m "docs: update generated developer wiki"
git push origin HEAD