Repository navigation
Use wrangler pages deploy instead of the deprecated pages publish - #8114
Merged
robwalch merged 1 commit intoOct 23, 2026
Merged
Conversation
robwalch
approved these changes
Oct 23, 2026
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.
This PR will...
Replace
wrangler pages publishwithwrangler pages deployinscripts/deploy-cloudflare.sh. The arguments stay the same.Why is this Pull Request needed?
With the installed wrangler 4.151.0,
pages publishis a deprecated alias forpages deploy. Thecloudflare_pagesjob prints this warning on every master build (for example, run 39840551384):In wrangler's source,
pages publishuses the same command definition aspages deploy. The only extra thing it does is log that warning (packages/wrangler/src/pages/deploy.ts). The currentpages deploydocs list the flags the script uses:--project-name,--branch,--commit-hashand--commit-dirty. Switching now means the deploy keeps working when Renovate brings in the next wrangler major.Are there any points in the code the reviewer needs to double check?
I couldn't run an actual deploy, because that needs the Cloudflare token. Verification was done in a
node:24-bookwormcontainer afternpm ci --ignore-scripts, on master first and then on this branch:bash -n scripts/deploy-cloudflare.shpasses on both.wrangler pages publish --helpandwrangler pages deploy --helplist the same positionals and options. Only the command name and description lines differ.--project-name x --commit-dirty=true --branch=master --commit-hash=0000000 <empty dir>,CI=true, no token). Both parse the arguments and stop at the sameCLOUDFLARE_API_TOKENrequired error. Onlypublishprints the deprecation warning.Resolves issues:
None filed.
Checklist
Found with unstale, a tool I'm building so nobody has to read every changelog to catch changes like this one. Prepared with AI assistance (Claude Code) and verified as described above.