Skip to content

ci: add docs-dispatch workflow (composer pings) - #2

Merged
vdavez merged 4 commits into
mainfrom
ci/docs-dispatch
Oct 19, 2026
Merged

vdavez merged 4 commits into
mainfrom
ci/docs-dispatch

Conversation

@makegov-hal

@makegov-hal makegov-hal Bot commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/workflows/docs-dispatch.yml: on a push to main that changes docs/, README.md or CHANGELOG.md, it sends a repository_dispatch so the docs site at docs.makegov.com rebuilds.
  • Same trigger paths, dispatch payload and actions/checkout@v6 as the workflow the Python and Node SDKs run.
  • Hardened beyond the original sibling workflow (the siblings are getting the same change):
    • Step outputs and event fields reach the scripts through env: as quoted shell variables, never as ${{ }} expanded into the script text, so a file name can't inject shell.
    • Change detection diffs the whole push (github.event.before..github.sha, full history checked out) instead of only the last commit, so a multi-commit push can't miss an earlier docs change.
    • A manual workflow_dispatch, a new branch (all-zero before) or a force-push whose before is no longer in the history dispatches unconditionally, reporting the last commit's paths.

Before merging

  • Add the DOCS_DISPATCH_TOKEN repository secret (a token with contents:write on the docs repository). Without it the dispatch step fails on every docs change.
  • Optionally set the DOCS_TARGET_REPO repository variable to override the dispatch target.

🤖 Generated with Claude Code

~ Mark

@infinityplusone
infinityplusone force-pushed the ci/docs-dispatch branch 2 times, most recently from 413ad93 to c9db378 Compare May 15, 2026 19:24
infinityplusone and others added 2 commits October 19, 2026 13:36
Pings makegov/docs (the editorial composer) via repository_dispatch
when docs/, README.md, CHANGELOG.md, or crates/*/src/** changes on main.
docs.makegov.com rebuilds the Rust SDK pages from this repo's docs/.

Requires the DOCS_DISPATCH_TOKEN repo secret with contents:write on
makegov/docs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… version

The docs composer consumes docs/, README.md and CHANGELOG.md, so a source-only change no longer pings it.
Bumps actions/checkout to v6 to match tango-python.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
vdavez and others added 2 commits October 19, 2026 14:31
Step outputs and event fields now reach the scripts as environment variables instead of being expanded into the script text, so a file name can no longer inject shell.
Change detection diffs `before..sha` instead of only the last commit, with full history checked out, so a multi-commit push no longer misses an earlier docs change.
A manual run, a new branch or a force-push whose `before` is gone dispatches unconditionally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without a usable `before` (an all-zero one, one missing from the clone after a force-push, or a manual run), the earlier docs changes in the push can't be seen, so diffing only the tip commit could skip a needed rebuild.
That branch now sets `force=true` and always dispatches, reporting the tip commit's paths.
The workflow now matches the other SDK repos' copy apart from its header and checkout version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vdavez
vdavez merged commit b26b01e into main Oct 19, 2026
9 checks passed
@vdavez
vdavez deleted the ci/docs-dispatch branch October 19, 2026 19:47
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.

2 participants