ci: docs build check on PRs + consolidate PyPI publishing#321
Merged
Conversation
Two release-process hardening changes: 1. Add docs-check.yml: runs 'mkdocs build --strict' on pull requests that touch docs/mkdocs/sources, so broken mkdocstrings references (like the benchmark -> terratorch_iterate rename) and dead nav links are caught on the PR instead of during a release deploy. 2. Consolidate the two PyPI-publish workflows into one. Previously both publish-pypi.yml (on tag) and python-publish.yml (on release) fired for every release and raced to upload the same artifacts, with the loser logging a 400. Keep the more robust tag-based workflow (twine check, setuptools_scm, full history), add --skip-existing so moving a tag to pick up a fix no longer fails, and delete python-publish.yml. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Romeo Kienzler <romeo.kienzler1@ibm.com>
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.
Two release-process hardening changes, following the v0.5.0 release where a stale docs reference broke the deploy and two PyPI workflows raced.
1. Catch docs breakage on PRs (
docs-check.yml)New workflow runs
mkdocs build --stricton pull requests that touchdocs/**,mkdocs.yml,src/**, orterratorch_iterate/**. The v0.5.0 docs deploy failed because mkdocstrings:::directives still pointed at the renamedbenchmarkpackage —--strictwould have caught that (and dead nav links) on the PR. Installs the same deps as the deploy +pip install -e .for introspection.2. Consolidate PyPI publishing
Previously both
publish-pypi.yml(on tagv*) andpython-publish.yml(on release published) fired for every release and raced to upload identical artifacts — the loser logged a400 Bad Request.publish-pypi.yml(hastwine check,setuptools_scm,fetch-depth: 0).--skip-existingto the upload so re-triggering a tag (e.g. moving it to pick up a docs fix, as done for v0.5.0) no longer fails on the already-published version.python-publish.yml.Verified
mkdocs build --strictexits 0 locally.🤖 Generated with Claude Code