Dashboard › craft › Distillation
4db7a67b-71bb-4067-817f-fff00e82c62b["a1a643827ba9df5b756504cc980e0409","ee3137fb6f9d81fabf75d5cdafef58dd","f0ad633a767a62655183f2c2a0d46659","61d4c909b6fa4c743c09a07fca59a001","35c5b0d08673df09e87694c5fb66024d","576c97c648894450c9487f009326f1d3","a858d3772fe0bdb50b992f7056e619ef","9b1192d94555134104761aa036b89bb8"]
productionBranch option (line 16) — "The Pages project's production branch name. Passed to wrangler pages deploy --branch so a release always targets the production environment. Default: main. This is the Cloudflare environment selector, not your git release branch."CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID are both required and "are passed to wrangler via the environment, never on the command line."deployType (pages default, or worker), wranglerCliPath (default wrangler or WRANGLER_BIN env var), workingDir (subdirectory for extracted artifact), and default workflow: look for cloudflare.zip/*-cloudflare.zip artifact, extract, deploy via wrangler.deploy2() in cli.js:298960 — if no --branch passed, isProduction = true (production deploy); if --branch <X> passed, production only if <X> exactly matches project's server-side production_branch (exact string match, fetched via GET /accounts/{id}/pages/projects/{name}). No universal hardcoded default of main; wrangler's own fallback prompt default is literal string "production" (cli.js:299802, pages project create); Cloudflare docs state default production branch is "the branch you first push." Non-interactive mode with no --production-branch errors ("Missing production branch").getActiveAccountId/getOrSelectAccountId2 (cli.js:112569+): 1. temporary/preview account (only with --temporary), 2. config.account_id from wrangler.toml/.jsonc, 3. CLOUDFLARE_ACCOUNT_ID env var, 4. cached account, 5. fetch all accounts token can access — single account auto-selected/cached; multi-account interactive prompts; multi-account non-interactive (CI) errors listing account IDs (names redacted in CI). Cloudflare docs mark CLOUDFLARE_ACCOUNT_ID as optional.CLOUDFLARE_API_TOKEN (deprecated alias CF_API_TOKEN), CLOUDFLARE_API_KEY+CLOUDFLARE_EMAIL (legacy Global API Key, deprecated aliases CF_API_KEY/CF_EMAIL), OAuth via wrangler login, CLOUDFLARE_ACCESS_CLIENT_ID+CLOUDFLARE_ACCESS_CLIENT_SECRET (Access service tokens, for reaching Access-protected origins, not deployment auth). No built-in Cloudflare OIDC/keyless flow exists in wrangler v4 (unlike npm target's OIDC path). Account ID confirmed to be an identifier, not a credential — API token is the true secret; wrangler's log sanitizer (WRANGLER_LOG_SANITIZE, default true) redacts account IDs as PII-ish but not as auth secret.git rev-parse --is-inside-work-tree fails → branch stays undefined → isProduction = true by default (production deploy) even without --branch. Wrangler v4 pages deploy has no --production flag and rejects --env ("Pages does not support targeting an environment with the --env flag...", cli.js:300130); --branch is the only Pages environment selector (--env/CLOUDFLARE_ENV apply only to Workers wrangler deploy).DEFAULT_PRODUCTION_BRANCH = 'main' (line 52) — reconsider/document exact-match semantics, or make `