vercel redeploy command is used to rebuild and redeploy an existing deployment.
vercel redeploy [deployment-id or url]
stdout is always the Deployment URL.
vercel redeploy https://example-app-6vd6bhoqt.vercel.app > deployment-url.txt
If you need to check for errors when the command is executed such as in a CI/CD workflow,
stderr. If the exit code is anything other than
0, an error has occurred. The
following example demonstrates a script that checks if the exit code is not equal to 0:
# save stdout and stderr to files
vercel redeploy https://example-app-6vd6bhoqt.vercel.app >deployment-url.txt 2>error.txt
# check the exit code
if [ $code -eq 0 ]; then
# Now you can use the deployment url from stdout for the next step of your workflow
# Handle the error
echo "There was an error: $errorMessage"
These are options that only apply to the
vercel redeploy command.
--no-wait option does not wait for a deployment to finish before exiting from the
vercel redeploy https://example-app-6vd6bhoqt.vercel.app --no-wait
The following global options can be passed when using the
vercel redeploy command:
For more information on global options and their usage, refer to the options section.