Skip to content

ci: allow manual re-run of the docs deploy - #48

Closed
Roy-Kid wants to merge 1 commit into
Teoroo-CMC:masterfrom
Roy-Kid:ci/manual-docs-deploy
Closed

Roy-Kid wants to merge 1 commit into
Teoroo-CMC:masterfrom
Roy-Kid:ci/manual-docs-deploy

Conversation

@Roy-Kid

@Roy-Kid Roy-Kid commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Deploy docs job pushes the built site to gh-pages with mike deploy -p. gh-pages is a single shared ref, so two master merges landing close together deploy in parallel and the slower job's push is rejected:

error: failed to push branch gh-pages to origin:
 ! [rejected]  gh-pages -> gh-pages (fetch first)

That is what broke run 35215109985 — #47 and #46 merged 36 seconds apart, #47's deploy won the race, and #46's docs fix never reached the site. Everything else in the run (pytest on Py3.9/3.10/3.11 + TF 2.15, both docker builds) was green.

Change

Waiting for a PR's docs deploy to finish before merging the next one avoids the race, so this does not serialize deploys automatically. It only opens the repair path for when the race happens anyway.

The workflow already listed workflow_dispatch under on:, but deploy-docs was gated on github.event_name == 'push' — so "Run workflow" rebuilt and re-tested without ever redeploying the docs. The gate now accepts workflow_dispatch as well, with the Teoroo-CMC/PiNN and master/v*-ref conditions unchanged. One line plus a comment explaining the race; no new file and no duplicated deploy steps.

Note that a manual run still goes through needs: pytest first, so a replay costs a full test matrix (~10 min). That seemed better than duplicating the checkout/install/mike deploy block into a second workflow just to skip the tests.

Test plan

  • YAML parses; on: keeps push / pull_request / workflow_dispatch, and deploy-docs keeps its steps and needs: pytest
  • gh-pages is currently back in sync (re-ran the failed job — the site is at b166b86), so the condition can be tested from a clean state
  • After merge, "Run workflow" on master redeploys the docs and gh-pages advances
  • A workflow_dispatch run from a non-master branch still skips deploy-docs

The docs deploy pushes to gh-pages, a single shared ref, so two master merges
landing seconds apart deploy in parallel and the slower job's `mike deploy -p`
is rejected as non-fast-forward. That is what broke run 35215109985: Teoroo-CMC#47 and
Teoroo-CMC#46 merged 36 seconds apart, Teoroo-CMC#47 won the race, and Teoroo-CMC#46's docs fix never reached
the site while everything else in the run was green.

Waiting for a PR's docs deploy to finish before merging the next one avoids the
race, so this does not serialize deploys automatically. It only opens the
repair path: the workflow already accepted workflow_dispatch, but deploy-docs
was gated on `github.event_name == 'push'`, so a manual run rebuilt and tested
without ever redeploying the docs. Accepting workflow_dispatch there makes
"Run workflow" on master actually replay the deploy.
@Roy-Kid
Roy-Kid force-pushed the ci/manual-docs-deploy branch from 4d04fc7 to a3f0c21 Compare September 17, 2026 12:12
@Roy-Kid Roy-Kid changed the title ci: add manual docs deploy workflow ci: allow manual re-run of the docs deploy Sep 17, 2026
@Roy-Kid Roy-Kid closed this Sep 17, 2026
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