_private/qwestly-docs/CI-CD/vercel-skip-deploy-for-one-commit.md

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

  1. Open the project in Vercel: Project SettingsBuild and DeploymentIgnored Build Step.
  2. 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 0 means ignore the build (skip deploy).
  • Exit 1 means 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.