mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-23 19:41:54 +00:00
feat(infra): add skip-preview tag check in Vercel deployment script (#32600)
Having vercel attempt to deploy on each commit (even if unrelated to docs) was getting annoying. Options: - `[skip-preview]` - `[no-preview]` - `[skip-deploy]` Full example: `fix(core): resolve memory leak [no-preview]`
This commit is contained in:
parent
00259b0061
commit
d204f0dd55
@ -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_OWNER: $VERCEL_GIT_REPO_OWNER"
|
||||||
echo "VERCEL_GIT_REPO_SLUG: $VERCEL_GIT_REPO_SLUG"
|
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 { \
|
if { \
|
||||||
[ "$VERCEL_ENV" == "production" ] || \
|
[ "$VERCEL_ENV" == "production" ] || \
|
||||||
@ -13,10 +21,10 @@ if { \
|
|||||||
[ "$VERCEL_GIT_COMMIT_REF" == "v0.2" ] || \
|
[ "$VERCEL_GIT_COMMIT_REF" == "v0.2" ] || \
|
||||||
[ "$VERCEL_GIT_COMMIT_REF" == "v0.3rc" ]; \
|
[ "$VERCEL_GIT_COMMIT_REF" == "v0.3rc" ]; \
|
||||||
} && [ "$VERCEL_GIT_REPO_OWNER" == "langchain-ai" ]
|
} && [ "$VERCEL_GIT_REPO_OWNER" == "langchain-ai" ]
|
||||||
then
|
then
|
||||||
echo "✅ Production build - proceeding with build"
|
echo "✅ Production build - proceeding with build"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Checking for changes in docs/"
|
echo "Checking for changes in docs/"
|
||||||
|
Loading…
Reference in New Issue
Block a user