From aba7c8c8003c0e8c99277db1ba766e28685af8c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hauke=20T=C3=B6njes?= Date: Wed, 1 Nov 2023 20:55:49 +0100 Subject: [PATCH] chore: Only deploy on tag creation --- .github/workflows/release.yml | 21 +++++++++++++++++++++ vercel.json | 7 +++++++ 2 files changed, 28 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 vercel.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ad4fb76 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: Production Tag Deployment +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} +on: + push: + tags: + - "v*.*.*" +jobs: + Deploy-Production: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Vercel CLI + run: npm install --global vercel@latest + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} + - name: Build Project Artifacts + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy Project Artifacts to Vercel + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..540ffc6 --- /dev/null +++ b/vercel.json @@ -0,0 +1,7 @@ +{ + "git": { + "deploymentEnabled": { + "main": false + } + } +}