Skip to content

ci(release): regenerate docs API reference on release#169

Merged
rahlk merged 1 commit into
mainfrom
ci/dispatch-docs-on-release
Jun 27, 2026
Merged

ci(release): regenerate docs API reference on release#169
rahlk merged 1 commit into
mainfrom
ci/dispatch-docs-on-release

Conversation

@rahlk

@rahlk rahlk commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

What

After a successful release (GitHub release + PyPI publish), send a repository_dispatch (event-type: sdk-release) to codellm-devkit/docs carrying the released tag in client_payload.ref.

The docs repo listens for this event (.github/workflows/update-api-docs.yml), clones this SDK at the released tag, regenerates the Python API reference with griffe (scripts/gen_api_docs.py), and opens a PR when the generated reference changed — keeping the source-controlled docs version-matched to each release.

Why

The docs deploy.yml already regenerates the reference ephemerally for the published site, but never commits it back, so the source-controlled reference/python-api/*.md drifts from the SDK. This closes that gap automatically, on release only (no cron, no manual step).

Required before this works

Add a repo secret DOCS_DISPATCH_TOKEN to this repository: a PAT (or fine-grained token) with contents: write on codellm-devkit/docs. GitHub's default GITHUB_TOKEN cannot dispatch across repositories, so without this secret the new step fails on release.

Trigger flow

git push tag vX.Y.Z → this release workflow publishes → dispatch sdk-release → docs regenerate + open PR.

After publishing to GitHub and PyPI, send a repository_dispatch (sdk-release) to
codellm-devkit/docs carrying the released tag, so the docs repo regenerates and
opens a PR for the Python API reference matched to this version.

Requires a DOCS_DISPATCH_TOKEN secret: a PAT/fine-grained token with
contents:write on codellm-devkit/docs.
@rahlk rahlk added documentation Improvements or additions to documentation ci continuous integration goodies labels Jun 27, 2026
@rahlk rahlk merged commit c932937 into main Jun 27, 2026
@rahlk rahlk deleted the ci/dispatch-docs-on-release branch June 27, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci continuous integration goodies documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant