add vercel script for determining deployment skipping (#2277)

This commit is contained in:
Matthew Callens 2022-11-22 11:49:12 -05:00 committed by GitHub
parent b8cda8a717
commit be67192f2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

13
docs/vercel.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
git diff --quiet HEAD^ HEAD ./
has_changes=$?
echo ">> Diff status $has_changes"
if [[ $VERCEL_GIT_COMMIT_REF == "master" ]] || [ $has_changes == 1 ]; then
echo ">> Proceeding with deployment."
exit 1;
else
echo ">> Skipping deployment."
exit 0;
fi