_private/qwestly-docs/CI-CD/vercel-skip-deploy-for-one-commit.md
Table of Contents
Skip Vercel deployment for a single commit
If you only want to prevent a specific push from deploying, configure a Custom Ignored Build Step in the Vercel project so builds are skipped when the commit message contains a chosen tag.
Setup
- Open the project in Vercel: Project Settings → Build and Deployment → Ignored Build Step.
- For behavior, choose Custom and use this command to skip builds when
[skip deploy]appears in the latest commit message:
git log -1 --pretty=oneline --abbrev-commit | grep -w "\[skip deploy\]" && exit 0 || exit 1
- Exit
0means ignore the build (skip deploy). - Exit
1means do not ignore (run the build as usual).
You can change the phrase inside grep if you prefer another tag (for example [no deploy]).
Usage
Include the tag in the commit message when you push:
git commit -m "update docs [skip deploy]"
Each Vercel-connected repository needs this setting configured on its own project if you want the same behavior everywhere.