Deploy a preview to a branch

cloudflare pages

// what it does

Deploys to a non-production branch, producing an isolated `*.pages.dev` preview URL with its own preview-environment secrets and bindings. Use it to share a build for review without touching production.

// shell

$ wrangler pages deploy ./dist --project-name my-app --branch feature-login

// gotcha

Deploying with `--branch` set to the project's production branch publishes straight to your live domain — the branch name, not a separate flag, is what selects prod vs preview.