ci(wiki): publish docs/wiki/ to the GitHub Wiki on push to main#11
Merged
Conversation
GitHub Wikis live in a separate <repo>.wiki.git repo, so checking pages into docs/wiki/ never reaches the rendered Wiki tab. Bridge that gap: - scripts/publish_wiki.sh — clones the wiki repo, mirrors docs/wiki/ into it (renaming README.md → Home.md), regenerates _Sidebar.md, and pushes. Idempotent; no-ops if there's nothing to sync. - scripts/build_wiki_sidebar.py — emits _Sidebar.md from the on-disk hierarchy (top-level pages, Frameworks, Cookbook book chapters). - .github/workflows/wiki.yml — runs on push to main when docs/wiki/**, the script, or this workflow change. Authenticates to the wiki repo with the built-in GITHUB_TOKEN over HTTPS. - docs/wiki/README.md gains a "How this wiki is published" section documenting local preview (gollum) and manual publish. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The wiki tab pulls from a separate repo at `.wiki.git`, so files committed to `docs/wiki/` never appeared on https://github.com/knowledgestack/ks-cookbook/wiki on their own. This PR bridges them.
Pre-merge requirement
The Wiki must be enabled on the repo (Settings → Features → Wikis) and initialized once (any user clicks "Create the first page" so `.wiki.git` exists). After that, the workflow takes over.
Test plan
🤖 Generated with Claude Code