Skip to content

The agent engineering platform.

feat(infra): add skip-preview tag check in Vercel deployment script (#32600)

Mason Daughertyd204f0dd55e9
diff --git a/docs/ignore-step.sh b/docs/ignore-step.sh
index 2532c4c48b..5e075196bf 100755
--- a/docs/ignore-step.sh
+++ b/docs/ignore-step.sh
@@ -5,6 +5,14 @@ echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"
echo "VERCEL_GIT_REPO_OWNER: $VERCEL_GIT_REPO_OWNER"
echo "VERCEL_GIT_REPO_SLUG: $VERCEL_GIT_REPO_SLUG"
+echo "Checking for skip-preview tags..."
+COMMIT_MESSAGE=$(git log -1 --pretty=%B)
+echo "Commit message: $COMMIT_MESSAGE"
+if [[ "$COMMIT_MESSAGE" == *"[skip-preview]"* ]] || [[ "$COMMIT_MESSAGE" == *"[no-preview]"* ]] || [[ "$COMMIT_MESSAGE" == *"[skip-deploy]"* ]]; then
+ echo "🛑 Skip-preview tag found in commit message - skipping preview deployment"
+ exit 0
+fi
+
if { \
[ "$VERCEL_ENV" == "production" ] || \
@@ -13,10 +21,10 @@ if { \
[ "$VERCEL_GIT_COMMIT_REF" == "v0.2" ] || \
[ "$VERCEL_GIT_COMMIT_REF" == "v0.3rc" ]; \
} && [ "$VERCEL_GIT_REPO_OWNER" == "langchain-ai" ]
-then
+then
echo "✅ Production build - proceeding with build"
exit 1
-fi
+fi
echo "Checking for changes in docs/"