-
Notifications
You must be signed in to change notification settings - Fork 0
Wiki Publishing
The committed wiki source lives in docs/. The GitHub Actions workflow copies
that directory to the repository wiki on trusted master pushes.
The documentation/ directory is separate project/internal material and is not
published to the consumer wiki.
GitHub documents wikis as Git repositories that can be cloned with a
.wiki.git URL after the wiki has been initialized. GitHub also documents
GITHUB_TOKEN as scoped to the repository that contains the workflow.
This repository follows the same authentication model used by the related
Netdata AI Agent repository: the workflow uses secrets.GITHUB_TOKEN, grants
the publish job contents: write, and passes the token through an ephemeral
Git authorization header rather than storing credentials in the checked-out
remote configuration.
- Enable the repository wiki.
- Create the first wiki page from the GitHub Wiki UI once, so that the
backing
.wiki.gitrepository exists.
GitHub only exposes the wiki Git repository after the first wiki page exists. The publish workflow checks this before cloning and fails with a setup error if the wiki Git repository has not been initialized yet.
No custom wiki token is required. Do not commit token values or put token values in docs, SOWs, logs, or workflow summaries.
The workflow:
- validates pull requests that affect
docs/**, the wiki validator, or the wiki workflow; - publishes only on
masterpushes affectingdocs/**or the wiki workflow, plus manual dispatch; - checks out the repository read-only;
- validates internal wiki links locally;
- verifies that the backing wiki Git repository exists;
- clones the wiki into runner temporary storage;
- replaces the wiki working tree with
docs/; - commits only when content changed;
- pushes to the wiki branch that was cloned.
Pull requests do not publish the wiki.
Run:
python3 tests/docs/check_wiki_docs.pyThe validator checks required wiki files, local Markdown links, wiki-style links, and accidental local/private path leakage.
Optional private terms can be checked without hardcoding them into repository files:
DOCS_FORBIDDEN_TERMS="term1,term2" python3 tests/docs/check_wiki_docs.pyInternal wiki navigation must use GitHub wiki page links:
[[API-Overview|API Overview]]Do not link internal wiki pages as Markdown files:
[API Overview](API-Overview.md)The validator rejects internal *.md links because they can render as
repository file/raw-style links in the published GitHub wiki instead of wiki
page links.