Deployment
Ensure .vercel/ exists before deploying (via vercel link or vercel link --repo).
Basic Usage
vercel # preview deployment (default)
vercel --prod # production deployment
vercel --target staging # custom environmentPrebuilt Deploy
Build locally, deploy the output — avoids remote builds:
vercel build --prod
vercel deploy --prebuilt --prodIf build and deploy run in separate CI jobs, use --standalone so artifacts are self-contained:
vercel build --prod --standalone
# (upload .vercel/output/ as artifact, then in deploy job:)
vercel deploy --prebuilt --prodDeploy Output
- stdout: The deployment URL (pipeable)
- stderr: Progress and errors
URL=$(vercel deploy --prod)Forced Deploys And Build Cache
vercel deploy --force creates a new deployment even when Vercel would otherwise
reuse an existing result. For forced deploys, build cache is not retained unless
--with-cache is also provided.
Use this when you need a fresh preview build from the current local checkout:
vercel deploy . --target preview --forceFor large repositories, retry with an archive if the CLI reports too many files:
vercel deploy . --target preview --force --archive=tgzvercel redeploy <url> rebuilds an existing deployment, but it does not support
a no-cache flag. A manual CLI deploy is not the same as a Git integration
redeploy: it creates a new deployment from local source, so commit metadata,
aliases, source provenance, and dashboard grouping may differ from the original
Git-triggered deployment.
Accessing Preview Deployments
Use vercel curl — it handles deployment protection automatically:
vercel curl /api/health --deployment $PREVIEW_URLDo not disable deployment protection. Use vercel curl instead.
Other Deploy Commands
vercel redeploy <url>— rebuild an existing deployment; no no-cache flagvercel promote <url>— move a deployment to production without rebuildingvercel rollback <url>— revert to a previous deploymentvercel rolling-release/vercel rr— gradual traffic shifting
Workflows
Blue/Green
URL=$(vercel --prod --skip-domain) # deploy without domain assignment
vercel curl / --deployment $URL # verify (handles deployment protection)
vercel promote $URL # promote to productionRolling Release
vercel rr configure --enable --advancement-type=automatic --stage=10,5m --stage=50,10m
vercel rr start --dpl=<deployment-url> --yes
vercel rr fetchSee references/project-infra.md for approve, abort, and complete commands.