Use when the user explicitly asks to take a healthy staging deployment all the way to production in one flow: inspect the repository's CI/CD setup, identify how staging and production are deployed, verify staging health, write a reusable production deploy script when the deployment path is clear but not yet scripted, then trigger production and monitor rollout status until production is deployed and healthy.
gh. Check gh --version. If missing, ask the user to install gh and stop.gh session. Run gh auth status. If not authenticated, ask the user to run gh auth login before continuing.vercel, netlify, wrangler, render, flyctl, or kubectl, prefer the repo's documented command path. If the required CLI is missing and GitHub alone cannot complete the deploy, ask the user to install or authenticate it and stop.codex/deploy-prod-{short-sha}.deploy prod: {staging-ref} -> {prod-ref} @ {short-sha}.[codex] deploy prod: {staging-branch} -> {prod-branch} @ {short-sha}.git status -sbgit branch --show-currentgit remote -vgh repo view --json nameWithOwner,defaultBranchRef,url.github/workflows, .circleci, .buildkite, render.yaml, vercel.json, netlify.toml, Dockerfile*, docker-compose*, Makefile, Taskfile*, package.json, pyproject.toml, README*, docs/**, scripts/**, bin/**rg -n "staging|prod|production|deploy|health|workflow_dispatch|repository_dispatch|environment|release|promote" ...gh api repos/{owner}/{repo}/branches --paginate --jq '.[].name'gh api repos/{owner}/{repo}/actions/workflowsgh run list --limit 20 --json databaseId,workflowName,headBranch,headSha,event,status,conclusion,url,createdAtgh api repos/{owner}/{repo}/environmentsgh api repos/{owner}/{repo}/deployments?per_page=20git ls-remote --heads origin <staging-branch>curl -fsS, response-body assertions, or a documented /health / /readyz endpoint.scripts/ or bin/.gh / repo command, and exit non-zero on failure.workflow_dispatch, trigger it with gh workflow run ... and pass the discovered ref/environment inputs.git checkout -b "codex/deploy-prod-{short-sha}"git push -u origin $(git branch --show-current)gh pr view --json number,state,headRefName,baseRefNameGH_PROMPT_DISABLED=1 GIT_TERMINAL_PROMPT=0 gh pr create --fill --head $(git branch --show-current)gh pr merge using the mode that matches branch protection.gh run watch <run-id> when Actions drives deployment.staging, prod, main, or master; discover them from the repo and remote metadata.