i'm using vercel's ignore build step field to disable preview deploys (IE - only deploy if the branch is main)
I'm doing this with the following bash script:
if [[ "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1;
else
# Don't build
echo " - Build canceled"
exit 0;
fi
Now, another requirement I have is to only deploy if the changed files belong to a specific folder. Can I somehow combine these two requirements in the same script?
How do I access the paths of the committed files in this bash script?
Thanks!