Skip to content

ci: docs build check on PRs + consolidate PyPI publishing#321

Merged
romeokienzler merged 1 commit into
mainfrom
ci-docs-and-pypi-cleanup
Jun 30, 2026
Merged

ci: docs build check on PRs + consolidate PyPI publishing#321
romeokienzler merged 1 commit into
mainfrom
ci-docs-and-pypi-cleanup

Conversation

@romeokienzler

Copy link
Copy Markdown
Member

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 --strict on pull requests that touch docs/**, mkdocs.yml, src/**, or terratorch_iterate/**. The v0.5.0 docs deploy failed because mkdocstrings ::: directives still pointed at the renamed benchmark package — --strict would 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 tag v*) and python-publish.yml (on release published) fired for every release and raced to upload identical artifacts — the loser logged a 400 Bad Request.

  • Keep the more robust tag-based publish-pypi.yml (has twine check, setuptools_scm, fetch-depth: 0).
  • Add --skip-existing to 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.
  • Delete the redundant python-publish.yml.

Note: publishing now triggers on the tag, not the GitHub Release event. The normal flow (create a release, which creates the tag) still publishes. If a release is ever created from a pre-existing tag, no tag-push event fires — use the tag to drive releases, as the existing process does.

Verified mkdocs build --strict exits 0 locally.

🤖 Generated with Claude Code

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>
@romeokienzler romeokienzler merged commit 50dc568 into main Jun 30, 2026
8 of 10 checks passed
@romeokienzler romeokienzler deleted the ci-docs-and-pypi-cleanup branch June 30, 2026 12:48
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