ci(release): regenerate docs API reference on release#169
Open
rahlk wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
After a successful release (GitHub release + PyPI publish), send a
repository_dispatch(event-type: sdk-release) tocodellm-devkit/docscarrying the released tag inclient_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 withgriffe(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.ymlalready regenerates the reference ephemerally for the published site, but never commits it back, so the source-controlledreference/python-api/*.mddrifts 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_TOKENto this repository: a PAT (or fine-grained token) withcontents: writeoncodellm-devkit/docs. GitHub's defaultGITHUB_TOKENcannot 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 → dispatchsdk-release→ docs regenerate + open PR.🤖 Generated with Claude Code