From 5c1e55857069a2089f81c2a2545a69204e0e5744 Mon Sep 17 00:00:00 2001 From: iCrawl Date: Wed, 20 Jul 2022 23:09:40 +0200 Subject: [PATCH] ci: add vercel check deploy branch script --- .github/check_deploy_branch.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 .github/check_deploy_branch.sh diff --git a/.github/check_deploy_branch.sh b/.github/check_deploy_branch.sh new file mode 100755 index 000000000000..5a9ef6c20507 --- /dev/null +++ b/.github/check_deploy_branch.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +git diff HEAD^ HEAD --quiet . + +if [[ "$VERCEL_GIT_COMMIT_REF" == "main" && $? -eq 1 ]]; then + # Proceed with the build + echo "✅ - Proceed" + exit 1; +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi