ci: deploy docs on release instead of every push to main#44
Merged
Conversation
Deploy the documentation site when a version is released instead of on every push to main, so the published docs describe the latest *released* library rather than unreleased main. changesets already creates a GitHub Release on publish, so trigger on `release: published` (the release tag's commit is checked out, matching the released code). `workflow_dispatch` stays as a manual redeploy escape hatch for docs-only fixes between releases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the documentation deployment workflow so the published GitHub Pages site reflects the latest released version (tag), instead of tracking every successful merge to main.
Changes:
- Switch docs deployment trigger from
workflow_run(CI onmain) torelease: published. - Keep
workflow_dispatchto allow manual redeploys between releases. - Remove the
workflow_run-specific success gate (github.event.workflow_run.conclusion) since the workflow is no longer triggered byworkflow_run.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address review: - Remove workflow_dispatch. It defaults to running on main, which would deploy *unreleased* docs to production — reintroducing the problem this change fixes. A failed Pages deploy can be re-run via GitHub's "Re-run jobs" on the release run, which keeps the release tag's commit as the checkout context. - Set concurrency cancel-in-progress: true so a version bump that publishes several Releases at once (each firing release: published for the same commit) collapses into a single Pages deploy instead of N identical ones. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Addressed the review in a follow-up commit:
Now strictly |
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
Docs currently deploy on every successful CI run on
main(viaworkflow_run), so the published site tracks unreleasedmain— not the latest released version.This switches the trigger to
release: published(plusworkflow_dispatchfor manual redeploys). changesets already creates a GitHub Release when it publishes, and the release event checks out the release tag's commit, so the docs match the released code.Effect
maincan move without stale-ifying or churning the published docs.🤖 Generated with Claude Code