From 727e60a3a3672b07d45e7286a866248da354f1d1 Mon Sep 17 00:00:00 2001 From: Pouria Delfanazari Date: Tue, 12 Dec 2023 13:11:38 -0800 Subject: [PATCH] Create ignored-build-step.sh --- ignored-build-step.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ignored-build-step.sh diff --git a/ignored-build-step.sh b/ignored-build-step.sh new file mode 100644 index 00000000..1a28cced --- /dev/null +++ b/ignored-build-step.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ "$VERCEL_GIT_COMMIT_REF" == "preview" || "$VERCEL_GIT_COMMIT_REF" == "main" ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; + +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi \ No newline at end of file