CNTRLPLANE-3997: correct wrangler pages deploy flags for docs publish - #9252
Conversation
…LANE-3997) Wrangler 4's `pages deploy` never accepted a `--production` flag; it only determines production vs. preview by comparing `--branch` against the Cloudflare project's configured production branch. The docs production deploy job was passing `--production`, which is an unrecognized argument and made the job fail with "Unknown argument: production". Replace it with `--branch=main`, matching the project's configured production branch, consistent with how the preview job already passes `--branch`. Also set HOME to the runner temp dir for the wrangler-action steps, since the ARC runners have no $HOME set and Wrangler was failing to write its debug log to /.config with EACCES. Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code)
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
📝 WalkthroughWalkthroughThe documentation deployment workflows now set Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: celebdor The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@celebdor: This pull request references CNTRLPLANE-3997 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
Docs Publish only ran on pushes touching docs/** or itself, so changes to the reusable build/deploy workflows it depends on (e.g. #9252) merged to main without triggering a production deploy. Add those workflow files to the path filter and add workflow_dispatch so the deploy can be re-run manually without needing a docs change. Signed-off-by: Antoni Segura Puimedon <antoni@redhat.com> Commit-Message-Assisted-by: Claude (via Claude Code)
Summary
Fixes the failing "Deploy Production" job in the new docs production publishing workflow.
wrangler pages deploy(v4) has no--productionflag — it never existed in any wrangler version. It only classifies a deployment as production by comparing--branchagainst the Cloudflare project's configured production branch (isProduction = project.production_branch === branch, confirmed by inspecting the bundled wrangler CLI). Passing--productionmade the command fail withUnknown argument: production, exit code 1. Replaced it with--branch=main, matching the project's configured production branch, consistent with how the preview job already passes--branch.$HOMEset, so Wrangler was failing withEACCES: permission denied, mkdir '/.config'trying to write its debug log (non-fatal here, but noisy and worth fixing). SetHOMEto${{ runner.temp }}for thewrangler-actionsteps in both the reusable deploy workflow and the PR-preview deploy workflow.Ref: CNTRLPLANE-3997
Test plan
Docs Publish/Deploy Productionsucceeds andhttps://hypershift.pages.dev/updateshttps://pr-<number>.hypershift.pages.dev🤖 Generated with Claude Code
Summary by CodeRabbit