ci: notify majorcontext.com when docs change on main#52
Conversation
📦 Previous Review (superseded by newer review)Claude finished @andybons's task in 1m 0s —— View job Review:
|
📦 Previous Review (superseded by newer review)Claude finished @andybons's task in 1m 22s —— View job Tasks
Review:
|
|
Claude finished @andybons's task in 58s —— View job Reviewing PR #52
Review:
|
|
Closing — the daily rebuild cron on the site (majorcontext.com) already fixes the staleness problem this was built for. Event-driven dispatch would only cut propagation from ~24h to ~1min for non-urgent docs, at the cost of maintaining a write-scoped PAT that expires and needs rotation. Not worth the standing credential liability. Branch preserved in history if we ever want instant propagation. |
What
Adds
.github/workflows/notify-site.yml— on push tomaintouchingdocs/content/**ordocs/README.md, it sends arepository_dispatch(event_type: docs-updated) tomajorcontext/majorcontext.com, which redeploys the docs site immediately instead of waiting for its daily rebuild cron.Fail-soft: if the
SITE_DISPATCH_TOKENsecret is unset or the dispatch call fails, the job logs a notice and exits 0 — a red check on every docs push would be worse than a missed dispatch, and the site's daily cron remains the fallback.Operator action required to activate
Create a fine-grained PAT owned by an account with write access to
majorcontext/majorcontext.com, scoped to only that repo, with Contents: Read and write (this is whatPOST /repos/{owner}/{repo}/dispatchesrequires for fine-grained PATs; Metadata: Read-only is auto-added). Store it as theSITE_DISPATCH_TOKENActions secret in this repo. Until then the workflow no-ops cleanly.Pairs with majorcontext.com's
repository_dispatchtrigger (separate PR).