Skip to content

Commit

Permalink
ci(vercel): add script for ignored build step (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykzts authored Mar 27, 2021
1 parent 04e0e45 commit 2b9d1d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 31 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/deploy.yml

This file was deleted.

14 changes: 14 additions & 0 deletions scripts/check-build-step.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

echo "VERCEL_ENV: $VERCEL_ENV"
echo "VERCEL_GIT_COMMIT_REF: $VERCEL_GIT_COMMIT_REF"

if [[ "$VERCEL_ENV" != "production" || "$VERCEL_GIT_COMMIT_REF" =~ ^v[[:digit:]]+(\.[[:digit:]]+(\.[[:digit:]]+)?)?$ ]] ; then
# Proceed with the build
echo "✅ - Build can proceed"
exit 1
else
# Don't build
echo "🛑 - Build cancelled"
exit 0
fi
6 changes: 0 additions & 6 deletions vercel.json

This file was deleted.

1 comment on commit 2b9d1d6

@vercel
Copy link

@vercel vercel bot commented on 2b9d1d6 Mar 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.