Skip to content

ci(release): dispatch the docs deploy on the staged release branch - #193

Merged
MarTrepodi merged 1 commit into
developfrom
ci/prepare-release-dispatch-docs
Oct 18, 2026
Merged

MarTrepodi merged 1 commit into
developfrom
ci/prepare-release-dispatch-docs

Conversation

@MarTrepodi

Copy link
Copy Markdown
Collaborator

Description

Makes a stable release's docs publish automatically when prepare-release.yml stages its branch.

prepare-release.yml pushes release/vX.Y.Z with GITHUB_TOKEN, and GitHub doesn't start workflow runs from GITHUB_TOKEN pushes. So the push: release/** trigger added to docs.yml in #191 never fires for a staged release, and the docs needed a manual Deploy docs run. This PR adds a step right after the branch push that runs gh workflow run docs.yml --ref release/vX.Y.Z. workflow_dispatch is the documented exception that GITHUB_TOKEN can trigger. The job gains actions: write for it.

It also fixes the cutover notes in CONTRIBUTING.md:

  • The github-pages environment must be kept. The guide said it could be deleted, but branch-based Pages builds (pages-build-deployment) still deploy through it. During the cutover, gh-pages had to be added to its deployment branches, because only main was allowed.
  • The cutover is done. 2.5.0 (latest) and 3.0.0a2 (alpha) are live, and the new Protect gh-pages ruleset blocks deleting and force-pushing gh-pages.

Only the comments in docs.yml change, to say that prepare-release.yml dispatches it.

Related Issues

Follow-up to #191.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (code change that neither fixes a bug nor adds a feature)
  • Performance improvement
  • Documentation
  • Tests
  • CI / build / dependencies

Checklist

  • This PR targets the develop branch (only release PRs target main)
  • My commits follow the Conventional Commits / Angular convention (feat:, fix:, refactor:, etc.) — they become the changelog
  • I have not edited CHANGELOG.md by hand (it is generated from commit messages)
  • I have added/updated docstrings with type hints for any new or changed public methods (n/a: workflow and docs only)
  • I have updated the docs (README.md, docs/, examples/) if user-facing behavior changed
  • I have added unit tests that cover my changes (mocked, not requiring a live comlink service) (n/a: workflow only)
  • Tests pass (uv run pytest tests/): no Python changes; required checks will confirm
  • Ruff linter and formatter pass (uv run ruff check src/ tests/ and uv run ruff format --check src/ tests/): no Python changes; required checks will confirm
  • Type check passes (uv run ty check src/swgoh_comlink/): no Python changes; required checks will confirm
  • I have not bundled unrelated changes in this PR

Testing

  • actionlint passes on prepare-release.yml and docs.yml.
  • The dispatched run goes through the same path as the manual runs and pushes already tested: docs.yml's job condition (swgoh-utils/comlink-python, refs/heads/release/*) and docs_version.py. Run 39131420131 on release/v3.0.0a2 published 3.0.0a2 as alpha through the gh-pages ruleset.
  • Not yet exercised end to end: the dispatch step itself runs on the next prepare release. Check its job summary and the Deploy docs run it starts.

🤖 Generated with Claude Code

prepare-release.yml pushes release/vX.Y.Z with GITHUB_TOKEN, and GitHub
does not start workflows from GITHUB_TOKEN pushes, so docs.yml's
`push: release/**` trigger never fired for a staged release. Dispatch
docs.yml on the new branch right after pushing it (workflow_dispatch is
the documented exception), which needs `actions: write`.

CONTRIBUTING: drop the manual "run Deploy docs" step, add the
github-pages environment's gh-pages deployment branch to the cutover
(branch-based Pages builds still deploy through that environment, so it
must not be deleted), and record that the cutover is done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation ci Changes related to continuous integration processes labels Oct 18, 2026
@MarTrepodi
MarTrepodi merged commit aa4b44f into develop Oct 18, 2026
16 checks passed
@MarTrepodi
MarTrepodi deleted the ci/prepare-release-dispatch-docs branch October 18, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Changes related to continuous integration processes documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant