fix: deploy docs only on release tags so the published version is clean - #97
Merged
Merged
Conversation
sphinx-build was running on every push to main, but the release tag isn't created until a later step in create-tag.yml, so setuptools_scm resolved a dev version (e.g. 0.1.2.dev0+g...) instead of the clean release version (e.g. 0.1.2). Gate the GitHub Pages deploy on the tag push instead. Also adds a docs status badge to the README. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0126spNDGtqDKMoYtuPT7JfW
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.
Summary
Docsworkflow deployed to GitHub Pages on every push tomain. Butcreate-tag.ymlcreates the release tag in a later step, after the merge commit lands onmain— so at deploy time the tagged commit didn't exist yet, andsetuptools_scmfell back to a dev version like0.1.2.dev0+g...instead of the clean0.1.2.deployjob ongithub.refstarting withrefs/tags/and addtags: ["*.*.*"]to thepushtrigger, so the deploy only runs once the real release tag is pushed (confirmed GitHub ignorespathsfilters for tag pushes, so this reliably triggers).0.1.2tag resolvesimportlib.metadata.version("devops")to0.1.2exactly.docsstatus badge to the README, linking to the published site.Test plan
git worktreecheckout of tag0.1.2+pip install -e ".[docs]"→ version resolves to0.1.2(no dev suffix)sphinx-build -b html -W docs/source docs/build/htmlstill succeeds with no warningsDocsworkflow build job passes on this PR🤖 Generated with Claude Code
https://claude.ai/code/session_0126spNDGtqDKMoYtuPT7JfW