Fix docs to deploy only when a new release is published#140
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the GitHub Pages docs deployment workflow trigger to avoid rebuilding/deploying docs on every push to main, aiming to keep published docs aligned with the latest released package version.
Changes:
- Add a
pathsfilter so the docs workflow runs on pushes tomainonly whensrc/microsoft/opentelemetry/_version.pychanges. - Add workflow comments explaining the intent of version-driven doc deployments.
Comments suppressed due to low confidence (2)
.github/workflows/docs.yml:9
- The path filter only watches
src/microsoft/opentelemetry/_version.py, but the package version is also declared inpyproject.toml([project].version). If a release/version bump updates onlypyproject.toml(or the two get temporarily out of sync), this workflow will not deploy updated docs. Consider includingpyproject.tomlinon.push.paths(and any other authoritative version file) so docs deploy reliably when the released version changes.
push:
branches: [main]
paths:
- "src/microsoft/opentelemetry/_version.py"
.github/workflows/docs.yml:5
- The new comment says docs rebuild “only when the package version changes”, but the workflow will run on any change to
_version.py(even non-version edits). Consider adjusting the wording to reflect the actual condition (file change) or constraining changes to that file to version bumps only.
# Rebuild docs only when the package version changes on main, so the
# published docs always match the latest released package version
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hectorhdzg
approved these changes
May 13, 2026
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.
No description provided.