Deploying Projects from Vercel CLI
Learn how to deploy your Vercel Projects from Vercel CLI using the vercel or vercel deploy commands.The vercel
command is used to deploy Vercel Projects and can be used from either the root of the Vercel Project directory or by providing a path.
vercel
You can alternatively use the vercel deploy
command for the same effect, if you want to be more explicit.
vercel [path-to-project]
When deploying, stdout is always the Deployment URL.
vercel > deployment-url.txt
By default, when you promote a deployment to production, your domain will point to that deployment. If you want to create a production deployment without assigning it to your domain, for example to avoid sending all of your traffic to it, you can:
- Turn off the auto-assignment of domains for the current production deployment:
vercel --prod --skip-domain
- When you are ready, manually promote the staged deployment to production:
vercel promote [deployment-id or url]
You can build Vercel projects locally to inspect the build outputs before they are deployed. This is a great option for producing builds for Vercel that do not share your source code with the platform.
It's also useful for debugging build outputs.
vercel build
This produces .vercel/output
in the Build Output API format. You can review the output, then deploy with:
vercel deploy --prebuilt
See more details at Build Output API.
Was this helpful?