Skip to content

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

Closed

Description

@yawkat

docs.yml runs the preview wrangler step (~line 48) on every non-release run. That step passes no --branch, so wrangler takes the branch from git. For a workflow_dispatch on main, that is main, which is the production branch. The release step also uses --branch=main.

This may be intended, since selected_version looks designed for manual production rebuilds. Decide which it is:

  • If it is intended: rename the step and/or pass --branch=${{ github.ref_name }} so it's explicit.
  • If it isn't: add if: github.ref != 'refs/heads/main' to the preview step, or pass a non-production branch name.

Also check that the Cloudflare token only has Pages Edit on this account.

Activity

  1. self-assigned this
    on Sep 25, 2026
  2. added
    question
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions