diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 09ab3a100..000000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Deploy - -on: - pull_request: - branches: - - '!*' - push: - branches: - - '!*' - tags: - - 'v*' - -jobs: - deploy: - name: Deploy - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Deploy to Vercel - run: npx vercel -S ${VERCEL_SCOPE} -c -t ${VERCEL_TOKEN} --prod - env: - VERCEL_SCOPE: ${{ secrets.VERCEL_SCOPE }} - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} diff --git a/scripts/check-build-step.sh b/scripts/check-build-step.sh new file mode 100755 index 000000000..78241aedd --- /dev/null +++ b/scripts/check-build-step.sh @@ -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 diff --git a/vercel.json b/vercel.json deleted file mode 100644 index a8cb77941..000000000 --- a/vercel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "github": { - "autoAlias": false - }, - "version": 2 -}