Skip to content

fix: deploy docs only on release tags so the published version is clean - #97

Merged
97gamjak merged 1 commit into
devfrom
bugfix/docs-release-version
Sep 13, 2026
Merged

97gamjak merged 1 commit into
devfrom
bugfix/docs-release-version

Conversation

@97gamjak

@97gamjak 97gamjak commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • The Docs workflow deployed to GitHub Pages on every push to main. But create-tag.yml creates the release tag in a later step, after the merge commit lands on main — so at deploy time the tagged commit didn't exist yet, and setuptools_scm fell back to a dev version like 0.1.2.dev0+g... instead of the clean 0.1.2.
  • Fix: gate the deploy job on github.ref starting with refs/tags/ and add tags: ["*.*.*"] to the push trigger, so the deploy only runs once the real release tag is pushed (confirmed GitHub ignores paths filters for tag pushes, so this reliably triggers).
  • Verified locally: building from a checkout of the 0.1.2 tag resolves importlib.metadata.version("devops") to 0.1.2 exactly.
  • Added a docs status badge to the README, linking to the published site.

Test plan

  • git worktree checkout of tag 0.1.2 + pip install -e ".[docs]" → version resolves to 0.1.2 (no dev suffix)
  • sphinx-build -b html -W docs/source docs/build/html still succeeds with no warnings
  • CI Docs workflow build job passes on this PR

🤖 Generated with Claude Code

https://claude.ai/code/session_0126spNDGtqDKMoYtuPT7JfW

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
@97gamjak
97gamjak merged commit 8ddad49 into dev Sep 13, 2026
3 checks passed
@97gamjak
97gamjak deleted the bugfix/docs-release-version branch September 13, 2026 12:49
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.

1 participant