From 3086f8b0163c20413d1fca6cf4ec610d146b81ea Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 3 Mar 2023 14:24:33 +0200 Subject: [PATCH] docs: added script to ignore builds in vercel (#3370) * docs: added script for vercel builds * fix exit --- www/docs/vercel-ignore.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 www/docs/vercel-ignore.sh diff --git a/www/docs/vercel-ignore.sh b/www/docs/vercel-ignore.sh new file mode 100644 index 0000000000..c82fcd1adb --- /dev/null +++ b/www/docs/vercel-ignore.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +current_branch=$(git branch --show-current) + +if [[ "$VERCEL_DEPLOY_BRANCHES" == *"$current_branch"* ]]; then + echo "Branch allowed to deploy" + exit 1; +else + echo "Branch not allowed to deploy" + exit 0; +fi \ No newline at end of file