fix: restore release deployment with Wrangler - #1026
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe release workflow is updated to restore Cloudflare production deployments by switching from the unavailable Pages action to Wrangler, using Node 22 and equivalent deployment settings. It also adds manual dispatch and self-triggering configuration changes so the repaired release pipeline can be rerun immediately. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path=".github/workflows/Release.yml" line_range="11-12" />
<code_context>
name: Release
on:
+ workflow_dispatch:
push:
branches:
</code_context>
<issue_to_address>
**issue (broader_impact):** A manually dispatched run can be started against any branch, but the job checks out that selected ref and deploys it to the Cloudflare `master` branch, while also creating a release from that ref. Running it from a stale or development branch publishes the wrong userscript to production.
**Triggers:** When a maintainer selects a ref other than `master` in the manual workflow dispatch UI.
**Suggested fix:** Restrict manual runs to `master` with a job-level condition, or require and validate a `master` ref before creating the release and deploying.
```suggestion
Release:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
```
</issue_to_address>Sourcery assessment
Needs a human reviewer. 1 finding to address first, and this changes the production deployment mechanism to Wrangler, so an invalid command, incompatible action, or unintended directory contents could leave the public Pages site unavailable or serving the wrong release. Reverting the workflow prevents future bad deploys, but it does not undo a deployment or outage that already occurred; a subsequent known-good deployment would be required.
Blocking findings: .github/workflows/Release.yml:12
| Release: | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
issue (broader_impact): A manually dispatched run can be started against any branch, but the job checks out that selected ref and deploys it to the Cloudflare master branch, while also creating a release from that ref. Running it from a stale or development branch publishes the wrong userscript to production.
Triggers: When a maintainer selects a ref other than master in the manual workflow dispatch UI.
Suggested fix: Restrict manual runs to master with a job-level condition, or require and validate a master ref before creating the release and deploying.
| Release: | |
| runs-on: ubuntu-latest | |
| Release: | |
| if: github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest |
What does this PR aim to accomplish?:
Restore the 3.7.0 release pipeline. Release run 35411776022 failed during job setup with
Unable to resolve action cloudflare/pages-action, not found, before publishing anything.How does this PR accomplish the above?:
cloudflare/pages-action@v1withcloudflare/wrangler-action@v3usingpages deploy . --project-name=xmoj-script --branch=master.Validation: parsed the workflow YAML and checked its triggers and deployment inputs against the Wrangler action manifest and official usage. Live release/deployment verification follows merge. This hotfix targets master because the failing production workflow must be replaced; no userscript changes.
By submitting this pull request, I confirm the following:
Summary by Sourcery
Restore the release pipeline by switching Cloudflare deployments to Wrangler and making the workflow easier to rerun after fixes.
Bug Fixes:
Enhancements:
CI:
Deployment:
Summary by cubic
Replaces the unavailable
cloudflare/pages-action@v1withcloudflare/wrangler-action@v3to restore the 3.7.0 release pipeline.pages deploy . --project-name=xmoj-script --branch=master, keeping the existing Cloudflare account, API token, directory, and production branch.workflow_dispatchand a trigger on.github/workflows/Release.ymlchanges so merging this fix starts a fresh release run.Written for commit 263eac3. Summary will update on new commits.