Adds the wiki publishing workflow (MIL-005 task 8).
Changes
tools/publish_wiki.py makes the Gitea wiki equal wiki/ through the wiki REST API: it creates new pages, updates changed ones (unchanged pages are skipped), and deletes pages that are not in wiki/. An empty or missing wiki/ aborts before any request, so the wiki cannot be wiped by mistake.
.gitea/workflows/publish-wiki.yml runs on push to main when wiki/** changes, and on manual dispatch. It has read-only permissions, serialised runs, runs build_wiki.py --check first and takes the new secret TOKEN_FOR_GITEA_WIKI through the environment only.
Errors use the same categories as the metadata sync (configuration, credentials, permissions, api); the token is never printed.
tests/test_publish_wiki.py (30 tests, offline, fake Gitea) covers the publish plan, error categories and the workflow's triggers, permissions and step order. Full suite: 120 passed.
guides/credentials.md, guides/troubleshooting.md and the README Requirements describe the secret and the new messages.
Wiki pages changed (rule 8)
Home, Credentials, Troubleshooting (regenerated with tools/build_wiki.py).
Notes
The task text says .gitea/scoped_workflows/. The workflow is in .gitea/workflows/ with a checkout because it publishes this repository's own wiki/ folder; scoped workflows apply across repositories and have no checkout.
The endpoints and request fields were checked against the instance's swagger.v1.json (Gitea 1.27.3). The workflow has not run against the real wiki: the secret does not exist yet (issue #33: S05 approves the scope, S03 stores it). The wiki repository has never been initialised; the first publish creates it.
Gitea has no wiki-only token scope; the guide recommends a dedicated user with write access to this repository only. S05 should confirm.
Adds the wiki publishing workflow (MIL-005 task 8).
## Changes
- `tools/publish_wiki.py` makes the Gitea wiki equal `wiki/` through the wiki REST API: it creates new pages, updates changed ones (unchanged pages are skipped), and deletes pages that are not in `wiki/`. An empty or missing `wiki/` aborts before any request, so the wiki cannot be wiped by mistake.
- `.gitea/workflows/publish-wiki.yml` runs on push to `main` when `wiki/**` changes, and on manual dispatch. It has read-only permissions, serialised runs, runs `build_wiki.py --check` first and takes the new secret `TOKEN_FOR_GITEA_WIKI` through the environment only.
- Errors use the same categories as the metadata sync (configuration, credentials, permissions, api); the token is never printed.
- `tests/test_publish_wiki.py` (30 tests, offline, fake Gitea) covers the publish plan, error categories and the workflow's triggers, permissions and step order. Full suite: 120 passed.
- `guides/credentials.md`, `guides/troubleshooting.md` and the README Requirements describe the secret and the new messages.
## Wiki pages changed (rule 8)
Home, Credentials, Troubleshooting (regenerated with `tools/build_wiki.py`).
## Notes
- The task text says `.gitea/scoped_workflows/`. The workflow is in `.gitea/workflows/` with a checkout because it publishes this repository's own `wiki/` folder; scoped workflows apply across repositories and have no checkout.
- The endpoints and request fields were checked against the instance's `swagger.v1.json` (Gitea 1.27.3). The workflow has not run against the real wiki: the secret does not exist yet (issue #33: S05 approves the scope, S03 stores it). The wiki repository has never been initialised; the first publish creates it.
- Gitea has no wiki-only token scope; the guide recommends a dedicated user with write access to this repository only. S05 should confirm.
Closes #42
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
Tirsvad
merged commit 611d665508 into main2026-10-10 03:06:39 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Adds the wiki publishing workflow (MIL-005 task 8).
Changes
tools/publish_wiki.pymakes the Gitea wiki equalwiki/through the wiki REST API: it creates new pages, updates changed ones (unchanged pages are skipped), and deletes pages that are not inwiki/. An empty or missingwiki/aborts before any request, so the wiki cannot be wiped by mistake..gitea/workflows/publish-wiki.ymlruns on push tomainwhenwiki/**changes, and on manual dispatch. It has read-only permissions, serialised runs, runsbuild_wiki.py --checkfirst and takes the new secretTOKEN_FOR_GITEA_WIKIthrough the environment only.tests/test_publish_wiki.py(30 tests, offline, fake Gitea) covers the publish plan, error categories and the workflow's triggers, permissions and step order. Full suite: 120 passed.guides/credentials.md,guides/troubleshooting.mdand the README Requirements describe the secret and the new messages.Wiki pages changed (rule 8)
Home, Credentials, Troubleshooting (regenerated with
tools/build_wiki.py).Notes
.gitea/scoped_workflows/. The workflow is in.gitea/workflows/with a checkout because it publishes this repository's ownwiki/folder; scoped workflows apply across repositories and have no checkout.swagger.v1.json(Gitea 1.27.3). The workflow has not run against the real wiki: the secret does not exist yet (issue #33: S05 approves the scope, S03 stores it). The wiki repository has never been initialised; the first publish creates it.Closes #42