Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I stop Vercel preview deployments from appearing on pull requests?

Tags:

github

vercel

I use Vercel to deploy a Next.js app and I use Vercel for GitHub for CI/CD. Vercel automatically deploys code pushed to my master branch to production, and I would like to keep this functionality. However, Vercel also creates preview deployments for each push, and when I create a pull request, this deployment shows up under 'Checks.' Is there a way to stop this from happening? I don't have an issue with Vercel creating a preview deployment for each push I make, but I would like for Vercel's deployment not to appear under the 'Checks' section of each pull request.

like image 442
Manav Bokinala Avatar asked Nov 23 '25 23:11

Manav Bokinala


1 Answers

Adding the following command in the ignored build step box of /settings/git page of your project to disable running the builds for non-production environments. Effectively disabling deploy previews

[ "$VERCEL_ENV" != production ]

enter image description here

like image 166
Dani Akash Avatar answered Nov 26 '25 13:11

Dani Akash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!