Skip to content

Instantly share code, notes, and snippets.

@aryankarim
Last active February 4, 2022 23:01
Show Gist options
  • Save aryankarim/d2db39344d4e83e73575b8e7afb38eb2 to your computer and use it in GitHub Desktop.
Save aryankarim/d2db39344d4e83e73575b8e7afb38eb2 to your computer and use it in GitHub Desktop.
Cancel deployment when changes happen in a specific folder on Vercel.
git diff HEAD^ HEAD --quiet ':!<folder_name>'
// E.g. I wanted to stop deployment when changes occured in cypress folder
// I put below code in the Ignored Build Step Command on Vercel
git diff HEAD^ HEAD --quiet ':!cypress'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment