Deploy to Cloudflare Pages

Upload production secrets and deploy a Cloudflare Pages project.
← Back to Cloudflare

For a Cloudflare Pages project, upload the decrypted production secrets, then deploy your built site. Start with the encrypted .env.production file from Production. Replace my-site with your Pages project name and dist with your build output directory. Run these commands in Bash or Zsh.

$ npx wrangler pages secret bulk <(npx dotenvx get -f .env.production --strict) --project-name my-site
$ npx wrangler pages deploy dist --project-name my-site
Open page ↗

Side path