Wiki Sync Bot

Wiki Sync Bot is a GitHub Actions workflow that mirrors pride-turnaround/_wiki/ to pride-wiki/content/. It is the only mechanism by which wiki content reaches Mat’s viewer at https://pride-wiki.pages.dev (served by Cloudflare Pages from the pride-wiki repo).

Trigger

  • Pushes to main on pride-turnaround when any file under _wiki/ changes
  • Manual runs via the GitHub Actions “workflow_dispatch” button

What it does

  1. Checks out pride-turnaround (source) via actions/checkout@v4 — fetches tracked files only
  2. Checks out shaemus-ops/pride-wiki (target) using a WIKI_VIEWER_PAT personal access token
  3. Runs rsync -av --delete from pride-turnaround/_wiki/ to pride-wiki/content/ with excludes for Cowork-facing files (WIKI-SCHEMA.md, *-PROMPT.md at root, WORKFLOW.md, QA-PASS-*.md), internal folders (_audit/, _templates/, .obsidian/), and Obsidian-specific file types (*.canvas)
  4. Commits to pride-wiki as “Wiki Sync Bot noreply@exudegroup.com” if anything changed, with the source commit SHA in the body
  5. Pushes to pride-wiki/main, triggering Cloudflare Pages to rebuild the Quartz site

Why it exists

Mat is non-technical and cannot work in Obsidian or git. He needs a read-only browsable website. The bot automates the pipeline so Shae’s Obsidian edits reach Mat without manual sync.

Where to find it

  • Workflow file: .github/workflows/wiki-ci.yaml in pride-turnaround
  • Required secret: WIKI_VIEWER_PAT (classic GitHub PAT with repo scope, stored as repository secret)
  • Target repo: shaemus-ops/pride-wiki
  • Target deploy: Cloudflare Pages project for pride-wiki (auto-deploys from main)

How to debug

Symptom: bot didn’t run after push. Check GitHub Actions tab in pride-turnaround. Verify the push touched a file under _wiki/. The trigger is path-filtered, so edits outside _wiki/ (including _specs/, scripts/, repo root) won’t trigger it.

Symptom: bot ran but target didn’t update. Check the “Check for changes” step in the workflow run log. If changed=false, rsync found no diff — either the exclude list is too aggressive, or the bot’s commit already pushed an equivalent change.

Symptom: bot ran but viewer still shows broken links. The bot only syncs tracked files. If a page links to a target that exists on Shae’s disk but isn’t git added, the viewer renders the broken link. Run python scripts/audit-wikilinks.py locally but note that this audit reads filesystem, not git — see WIKI-AUTO-1 for the proposed fix.

Symptom: “Resource not accessible by integration” error. The WIKI_VIEWER_PAT expired or was revoked. Regenerate a classic PAT with repo scope scoped to shaemus-ops/pride-wiki and update the repository secret.

Excluded from sync

  • WIKI-SCHEMA.md — authoring rules for Cowork, not user-facing
  • INGEST-PROMPT.md — Cowork session driver
  • DRIVE-REVIEW-PROMPT.md — Cowork session driver
  • /*-PROMPT.md (root-anchored) — future Cowork session prompts auto-excluded
  • WORKFLOW.md — Cowork session workflow notes
  • QA-PASS-*.md — Cowork QA session artefacts
  • _audit/ — audit reports (including wikilink-audit reports)
  • _templates/ — Obsidian page templates
  • .obsidian/ — vault configuration
  • *.canvas — Obsidian Canvas files (not renderable by Quartz)

Design gaps (tracked in WIKI-AUTO-1)

  • No pre-sync audit — the bot happily syncs broken wikilinks or malformed frontmatter
  • No anchor validation — [[Page#heading|Heading]] links aren’t verified against actual headings
  • No orphan detection — pages with no incoming links aren’t flagged