From 145cea82093747df4860973cfb16e98a12a3df73 Mon Sep 17 00:00:00 2001 From: Paullo9 Date: Fri, 30 Oct 2026 16:49:16 +0100 Subject: [PATCH] ci: release-please dispatches Docs on the tag it creates A tag pushed with GITHUB_TOKEN starts no workflow, so Docs' push: tags trigger never fires for a release-please release. The release-please job now runs docs.yml on the new tag, where the deploy job publishes to Pages. The docs.yml header says Pages is on instead of asking for it. Done: the next release publishes its docs without a manual re-run. Next: the libhdf5 zips in #32. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/docs.yml | 6 ++++-- .github/workflows/release-please.yml | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 80e6c79..23fcf5a 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,8 +3,10 @@ # On a pull request the site is built and uploaded as an artifact only, so a broken catalog fails before the tag. # # No swift-docc-plugin: the kit adds no package dependency for its docs. `xcodebuild docbuild` builds the archives -# from the package's own schemes; `docc merge` (Xcode 16+) joins them. Needs Pages enabled with source "GitHub Actions" -# (repository Settings > Pages). Copied from CuboKit's pattern; the module list is read from the .docc catalogs. +# from the package's own schemes; `docc merge` (Xcode 16+) joins them. Pages source is "GitHub Actions" and the +# github-pages environment allows tags `*.*.*`. A release-please tag starts no workflow (GITHUB_TOKEN), so +# release-please.yml dispatches this workflow on the new tag. Copied from CuboKit's pattern; the module list is read +# from the .docc catalogs. name: Docs on: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 6476ff8..3c24d02 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -6,6 +6,8 @@ # A PR opened with GITHUB_TOKEN starts no workflows, so this job dispatches CI on the Release PR's branch: the required # `test` check then reports on its head commit. Step env is evaluated even when `if` skips the step, so the PR JSON is # read with jq rather than fromJSON (empty on a run with no Release PR). Needs "Allow GitHub Actions to create and approve pull requests". +# The tag it pushes is made with GITHUB_TOKEN too, so Docs' `push: tags` never fires: the job dispatches Docs on the new tag, +# where `github.ref` is `refs/tags/` and the deploy job publishes to Pages (environment rule `*.*.*`). name: release-please on: @@ -37,3 +39,9 @@ jobs: env: PR: ${{ steps.release.outputs.pr }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish the docs for the new tag + if: steps.release.outputs.release_created + run: gh workflow run docs.yml --repo "$GITHUB_REPOSITORY" --ref "$TAG" + env: + TAG: ${{ steps.release.outputs.tag_name }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}