feat(workflow): Gitea-Wiki als generierter Spiegel von docs/ (#192)
CI / verify (push) Successful in 6m22s
CI / pwsh (push) Successful in 2m24s
Release / release (push) Successful in 34s
Release / wiki-mirror (push) Skipped

Konverter .gitea/scripts/wiki_mirror.py, Push-Skript wiki-push.sh, Job wiki-mirror in release.yml, Dispatch-Workflow wiki-mirror.yml und --check-Schritt in ci.yml. Version 9.0.0-beta.13.

Files changed:
- .gitea/scripts/wiki-push.sh
- .gitea/scripts/wiki_mirror.py
- .gitea/workflows/ci.yml
- .gitea/workflows/release.yml
- .gitea/workflows/wiki-mirror.yml
- CHANGES.md
- README.md
- VERSION
- docs/dev/development.md
- tools/chemenu/tests/test_wiki_mirror.py

Co-Authored-By: Claude Code <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SnAJ7Z3CpVD3PRbN73QtU2
This commit is contained in:
torbenandClaude Code committed 2026-10-07 23:10:19 +02:00
1 parent 45ae04cfee
commit 90ea0eea1b
10 files changed
+869 -3

No files matched your search

+51
View File
@@ -17,6 +17,13 @@
# instance issues - not a 1Password secret. Nothing here reaches outside the
# instance, so the Zero-Trust secret path that the container-build workflows
# use has nothing to carry.
#
# `wiki-mirror` is the second job: once `release` has published a release, it
# mirrors that tree's docs into the Gitea wiki (.gitea/scripts/wiki_mirror.py
# converts, wiki-push.sh pushes; wiki-mirror.yml does the same by hand for any
# tag). It is a separate job so that a failing mirror leaves the release and its
# tag standing: the release is the product, the wiki a view of it. It does not
# run for a `-beta.N` candidate, for which `release` sets `skip`.
name: Release
@@ -38,6 +45,10 @@ jobs:
image: debian:trixie-slim
permissions:
contents: write
outputs:
skip: ${{ steps.version.outputs.skip }}
version: ${{ steps.version.outputs.version }}
tag: ${{ steps.version.outputs.tag }}
env:
WIKITOOL_SESSION_ID: release-${{ github.run_id }}
WIKI_TRACE_DIR: /tmp/wikitool-trace
@@ -233,3 +244,43 @@ jobs:
done
echo "Done: ${PUBLIC_BASE_URL}/${GITHUB_REPOSITORY}/releases/tag/${TAG}"
wiki-mirror:
# Runs only after `release` succeeded and created a release (a candidate
# sets skip=true). `release` never depends on this job.
needs: release
if: needs.release.outputs.skip != 'true'
runs-on: linux-docker
container:
image: debian:trixie-slim
permissions:
contents: write
env:
VERSION: ${{ needs.release.outputs.version }}
TAG: ${{ needs.release.outputs.tag }}
PUBLIC_BASE_URL: https://gitea.nehmer.net
steps:
- name: System dependencies
run: |
set -eu
apt-get update -qq
apt-get install -y --no-install-recommends python3 git nodejs ca-certificates curl jq
rm -rf /var/lib/apt/lists/*
- uses: actions/checkout@v7
- name: Mirror the docs into the wiki
env:
WIKI_TOKEN: ${{ gitea.token }}
run: |
set -eu
python3 .gitea/scripts/wiki_mirror.py --source . --out /tmp/wiki-out \
--version "$VERSION" --repo-url "${PUBLIC_BASE_URL}/${GITHUB_REPOSITORY}"
.gitea/scripts/wiki-push.sh /tmp/wiki-out "$VERSION"
- name: Say which half failed
if: failure()
run: |
echo "Release ${TAG} is published; only the wiki mirror failed."
echo "The release and its tag stand. Dispatch wiki-mirror.yml with tag ${TAG} to retry the mirror."