diff --git a/vercel-production-build.sh b/vercel-production-build.sh new file mode 100644 index 0000000000..8d1c75ba28 --- /dev/null +++ b/vercel-production-build.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Use this script to only deploy production builds +# https://vercel.com/docs/platform/projects#ignored-build-step +# https://vercel.com/support/articles/how-do-i-use-the-ignored-build-step-field-on-vercel#with-a-script + +echo "VERCEL_ENV: $VERCEL_ENV" + +if [[ "$VERCEL_ENV" == "production" ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; + +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi