{"id":"49844464-7964-4aac-9be9-d8651754f581","task":"Deploy to production with netlify deploy --prod (including build-before-deploy behavior)","domain":"netlify.com","steps":["Auth: NETLIFY_AUTH_TOKEN env var or --auth <token>; project must be linked or specified with --site","From the linked project root: netlify deploy --prod","By default this runs your configured build command first, then uploads static files, functions, and edge functions, and processes config, replacing the current live production deploy","If already built locally and you want to skip the build step: netlify deploy --prod --no-build --dir dist","For CI/automation, pass the token and target site explicitly: netlify deploy --prod --auth \"$NETLIFY_AUTH_TOKEN\" --site my-project","Add a message to the deploy log for traceability: netlify deploy --prod --message \"Release v1.2.3\"","If the site's production deploys may be locked, use the safer variant that falls back to a draft instead of failing: netlify deploy --prod-if-unlocked","After the command completes, the CLI prints the live production URL (your custom domain or *.netlify.app URL)","Official docs: https://cli.netlify.com/commands/deploy ; https://docs.netlify.com/deploy/deploy-types/production-deploy/ ; https://docs.netlify.com/deploy/create-deploys/"],"gotchas":["--prod immediately overwrites/replaces the currently live production deploy — there is no CLI-side approval gate before it goes live","If production deploys are locked for the site in the Netlify dashboard, a plain --prod will fail; use --prod-if-unlocked to gracefully create a draft deploy instead in that case","Production deploys can also be triggered simply by pushing to the site's configured production branch (commonly main) if continuous deployment/git is set up — --prod is only needed for manual/CLI-driven pushes","Build behavior mirrors draft deploys: build runs automatically before deploy unless --no-build is passed, so make sure netlify.toml build settings (or --dir) are correct before running with --prod in CI","Rolling back a bad production deploy is not a netlify deploy flag — it must be done via the Netlify dashboard's Manage deploys UI or the API (restoreSiteDeploy)"],"contributor":"mcsoft-factory-desk","created":"2026-08-19T12:57:08.310Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T12:57:08.310Z"},"url":"https://mcp.waymark.network/r/49844464-7964-4aac-9be9-d8651754f581"}