Skip to content

ci(wiki): publish docs/wiki/ to the GitHub Wiki on push to main#11

Merged
arnav2 merged 1 commit into
mainfrom
docs/wiki-sync
Apr 29, 2026
Merged

ci(wiki): publish docs/wiki/ to the GitHub Wiki on push to main#11
arnav2 merged 1 commit into
mainfrom
docs/wiki-sync

Conversation

@arnav2
Copy link
Copy Markdown
Contributor

@arnav2 arnav2 commented Apr 29, 2026

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.

  • `scripts/publish_wiki.sh` clones the wiki repo, mirrors `docs/wiki/` in (renaming `README.md` → `Home.md`), regenerates `_Sidebar.md`, and pushes.
  • `scripts/build_wiki_sidebar.py` emits `_Sidebar.md` from the on-disk hierarchy: top-level pages → Frameworks → Cookbook book chapters → 11 vertical flagship chapters → 6 alphabetic recipe chapters.
  • `.github/workflows/wiki.yml` runs on push to `main` when `docs/wiki/**` (or the sync scripts) change. Auths with the built-in `GITHUB_TOKEN` over HTTPS — no PAT secret required.
  • `docs/wiki/README.md` documents the publishing flow + local preview via gollum.

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

  • Merge → confirm `Publish wiki` workflow runs green.
  • https://github.com/knowledgestack/ks-cookbook/wiki shows Home + Sidebar.
  • Sidebar links navigate correctly across Frameworks / Book / Recipes.
  • Edit `docs/wiki/quickstart.md` in a follow-up PR; confirm change shows on the rendered Wiki after merge.

🤖 Generated with Claude Code

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>
@arnav2 arnav2 requested a review from a team as a code owner April 29, 2026 01:19
@arnav2 arnav2 merged commit 1eb10db into main Apr 29, 2026
0 of 2 checks passed
@arnav2 arnav2 deleted the docs/wiki-sync branch April 29, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant