From e219687ea6a72c46bcd37629870b76960d1685bb Mon Sep 17 00:00:00 2001 From: Simon Chan <1330321+yume-chan@users.noreply.github.com> Date: Thu, 23 Dec 2021 10:34:41 +0800 Subject: [PATCH] ci: add vercel ignore build script --- common/scripts/vercel-should-deploy.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 common/scripts/vercel-should-deploy.sh diff --git a/common/scripts/vercel-should-deploy.sh b/common/scripts/vercel-should-deploy.sh new file mode 100644 index 00000000..3a94bce4 --- /dev/null +++ b/common/scripts/vercel-should-deploy.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ "$VERCEL_GIT_COMMIT_REF" == "gh-pages" ]] ; then + # Don't build + echo "🛑 - Build cancelled" + exit 0; +else + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; +fi