fix(ci): keep Cloudflare preview URLs enabled across deploys#235
Open
dcrawbuck wants to merge 1 commit into
Open
fix(ci): keep Cloudflare preview URLs enabled across deploys#235dcrawbuck wants to merge 1 commit into
dcrawbuck wants to merge 1 commit into
Conversation
Wrangler >=4.44 defaults per-version Preview URLs to match the workers_dev setting when preview_urls isn't set explicitly. This worker has workers_dev: false, so every deploy (each branch build runs 'wrangler versions upload') reset Preview URLs back to disabled, requiring a manual dashboard re-enable that the next build undid. Set preview_urls: true so PR/branch preview URLs persist across deploys. Enables preview URLs only — the production workers.dev route stays off.
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
superwall-docs | 9fd4012 | Jun 30 2026, 07:13 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Cloudflare Preview URLs for branch/PR builds keep silently turning off — you re-enable the toggle in the dashboard, then the next branch build disables it again.
Root cause (confirmed via Cloudflare docs)
Wrangler ≥ 4.44 defaults per-version Preview URLs to match the
workers_devsetting whenpreview_urlsisn't set explicitly. This worker has"workers_dev": false, and every deploy (each branch build runswrangler versions upload) reapplies the config → Preview URLs reset to disabled. With many branch builds, the dashboard toggle gets undone constantly.Fix
Set
"preview_urls": trueinwrangler.jsoncso previews persist across deploys. This enables preview URLs only — the productionworkers.devroute staysfalse.Unblocks clicking the per-version / branch preview URLs (e.g. for verifying PR builds like the sitemap work in #222).
Note
Low Risk
Single deploy-config flag with no application code changes; only affects Cloudflare preview URL behavior, not production routing.
Overview
Sets
preview_urls: true inwrangler.jsoncso branch/PR deploys stop turning off Cloudflare per-version Preview URLs on everywranglerupload.With Wrangler ≥ 4.44, missing
preview_urlsdefaults it to matchworkers_dev(falsehere), which overwrote manual dashboard toggles.workers_devstaysfalsefor production; only preview URLs are explicitly enabled.Reviewed by Cursor Bugbot for commit 9fd4012. Bugbot is set up for automated code reviews on this repo. Configure here.