Skip to content

Instantly share code, notes, and snippets.

@joshuabaker
Created May 15, 2023 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshuabaker/2068f6df30bc3539841c28404e629269 to your computer and use it in GitHub Desktop.
Save joshuabaker/2068f6df30bc3539841c28404e629269 to your computer and use it in GitHub Desktop.
For use on Vercel. Ignores the build step if a commit includes #nodeploy.
#!/bin/bash
echo "VERCEL_GIT_COMMIT_MESSAGE: $VERCEL_GIT_COMMIT_MESSAGE"
if [[ "$VERCEL_GIT_COMMIT_MESSAGE" == *"#nodeploy"* ]]; then
# Don't build
echo "🛑 - Build cancelled"
exit 0;
else
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;
fi
@joshuabaker
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment