Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,15 @@ jobs:
permissions: { pages: write, id-token: write, contents: read, actions: write, statuses: write }
```

Your `publish-dispatch.yml` wrapper's `workflow_dispatch` inputs must include `pr`
**and `retry-until`**, forwarding both into `publish.yml`'s `with:` — copy the shim
in [`docs/reference/workflows.md`](docs/reference/workflows.md) or the
[tutorial](docs/tutorials/adding-to-a-fresh-repo.md) verbatim rather than
hand-rolling it. `retry-until` is never set by a human; `publish.yml`'s
`re-dispatch` job always passes it when re-firing the shim after a tag release, so
a shim missing the input rejects that dispatch (breaking every tagged release's
re-publish, not just the wedged-origin retry it exists for).

Add a `release` job that `uses:` this repo's `release.yml@<tag>` (with `permissions:
contents: write`) to attach each tag's built `docs.zip` (bare `html/` root) as a
Release asset so `assemble` can reconstruct released versions, and the
Expand Down
1 change: 1 addition & 0 deletions docs/reference/workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ re-dispatch, a fork-PR preview, a manual re-deploy). A reusable workflow can't b
| `version-name` | no | `""` | Version name of **this run's** `docs` artifact to stage directly, instead of gathering it from durable sources. Set by `ci.yml`'s inline publish (the run isn't a completed success yet, so the gather can't discover it — or would find a stale previous build). Empty → pure durable gather (the dispatch paths). |
| `pr` | no | `""` | Fork PR number to approve (pins its head SHA as `preview-approved`) and preview. Set on the shim's `workflow_dispatch` path. |
| `dispatch-workflow` | no | `publish-dispatch.yml` | Filename of the shim in the consumer's repo, re-fired by the `re-dispatch` job. Override only if you renamed the shim. |
| `retry-until` | no | `""` | Internal — epoch-seconds deadline for auto-retrying a wedged Pages origin. Set only by the `re-dispatch` job (from the release's publish time) when it re-fires the shim; carried unchanged through any retries. **The shim must declare + forward this input** (`workflow_dispatch` + the `with:` block below) even though consumers never set it themselves — `re-dispatch` always passes it, and a shim missing the input rejects the dispatch. Don't set manually. |

## What `publish.yml` gathers

Expand Down
6 changes: 6 additions & 0 deletions docs/tutorials/adding-to-a-fresh-repo.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ on:
description: "Fork PR to approve + preview (empty = re-deploy)"
required: false
default: ""
retry-until:
description: "Internal — epoch-seconds retry deadline. Don't set manually."
required: false
default: ""
jobs:
publish:
uses: DiamondLightSource/myst-version-switcher-plugin/.github/workflows/publish.yml@__LATEST_TAG__
Expand All @@ -142,6 +146,8 @@ jobs:
pr: ${{ inputs.pr }}
# the file the tag re-dispatch re-fires
dispatch-workflow: publish-dispatch.yml
# forwarded so the re-dispatch job's auto-retry can re-fire this shim
retry-until: ${{ inputs.retry-until }}
permissions:
contents: read
actions: write
Expand Down