From 2eea5d4cb4eed4ff0e194713abd730b219ef6f51 Mon Sep 17 00:00:00 2001 From: Davis Chase <130488702+dev2049@users.noreply.github.com> Date: Sat, 17 Jun 2023 11:17:08 -0700 Subject: [PATCH] Add ignore vercel preview script (#6320) skip building preview of docs for anything branch that doesn't start with `__docs__`. will eventually update to look at code diff directories but patching for now --- docs/docs_skeleton/ignore_build.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 docs/docs_skeleton/ignore_build.sh diff --git a/docs/docs_skeleton/ignore_build.sh b/docs/docs_skeleton/ignore_build.sh new file mode 100755 index 00000000..114e4560 --- /dev/null +++ b/docs/docs_skeleton/ignore_build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF" + +if [[ $VERCEL_GIT_COMMIT_REF = __docs__* ]] ; then + # Proceed with the build + echo "✅ - Build can proceed" + exit 1; + +else + # Don't build + echo "🛑 - Build cancelled" + exit 0; +fi