Skip to content

Make docs manual-dispatch deploy branch explicit - #137

Merged
yawkat merged 1 commit into
mainfrom
fix/issue-113
Sep 25, 2026
Merged

yawkat merged 1 commit into
mainfrom
fix/issue-113

Conversation

@yawkat

@yawkat yawkat commented Sep 25, 2026

Copy link
Copy Markdown
Owner

Fixes #113.

A workflow_dispatch of docs.yml on main is meant to be a manual production rebuild. The step name said "preview", and the branch came implicitly from git. This makes it explicit:

  • The step is renamed to Publish (manual dispatch), with id cf_publish_dispatch.
  • It passes --branch=${{ github.ref_name }}. A dispatch on main deploys to production and any other branch gets a preview. wrangler-action runs command via @actions/exec without a shell, and ref names can't contain whitespace, so the interpolation stays a single argument.
  • The Check PR / Comment on PR steps are kept but skipped on main. They still post preview links when a PR branch is dispatched (e.g. run 24766436972 → Fix docs code block line breaks #52). They no longer post a misleading "Preview deployed" comment on an already-merged PR after a production rebuild. This means pull-requests: write (see Declare explicit GITHUB_TOKEN permissions in workflows #135) is still needed.

Manual check from the issue: confirm in the Cloudflare dashboard that CLOUDFLARE_API_TOKEN only has Account → Cloudflare Pages → Edit.

🤖 Generated with Claude Code

A workflow_dispatch of docs.yml on main is an intentional production
rebuild. Rename the non-release deploy step accordingly and pass
--branch=${{ github.ref_name }} so the Pages branch (production vs
preview) is explicit rather than inferred from git by wrangler.

Skip the PR lookup/comment on main: there the deploy is production and
the associated PR is the already-merged one, which previously got a
misleading "Preview deployed" comment (e.g. #49).

Fixes #113

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@yawkat yawkat added this to the 1.11.4 milestone Sep 25, 2026
@yawkat
yawkat enabled auto-merge (squash) September 25, 2026 15:44
@yawkat
yawkat merged commit edc9b11 into main Sep 25, 2026
6 checks passed
@yawkat
yawkat deleted the fix/issue-113 branch September 25, 2026 16:34
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.

docs.yml: a workflow_dispatch from main deploys to production under the "preview" step

1 participant