2
0

👷 Add script to deploy only dev or main branches on Vercel

This commit is contained in:
Baptiste Arnaud
2022-10-27 11:40:04 +02:00
parent e2e1c098a2
commit 8582c6e841

12
should-vercel-deploy.sh Normal file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
if [[ "$VERCEL_GIT_COMMIT_REF" == "dev" || "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then
echo "✅ - Build can proceed"
exit 1;
else
echo "🛑 - Build cancelled"
exit 0;
fi