From f2d3a623a6cdd5a8fa534fcd1e4b7d173daa3c7d Mon Sep 17 00:00:00 2001 From: ZHANGYU Date: Wed, 5 Jun 2024 22:43:40 +0800 Subject: [PATCH] GitHub Action deploy to vercel --- .github/workflows/deploy.yml | 22 ++++++++++++++++++++++ .github/workflows/discussion-opened.yml | 13 ------------- 2 files changed, 22 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/deploy.yml delete mode 100644 .github/workflows/discussion-opened.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5418751 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,22 @@ +name: Deploy + +on: + discussion: + types: [created, edited] + push: + branches: + - next14 +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Vercel cli + run: npm install -g vercel + - name: Setup + run: vercel pull --yes --environment=prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Build + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} + - name: Deploy + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} diff --git a/.github/workflows/discussion-opened.yml b/.github/workflows/discussion-opened.yml deleted file mode 100644 index 318967b..0000000 --- a/.github/workflows/discussion-opened.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: Deploy on Discussion Create - -on: - discussion: - types: [created, edited] - -jobs: - webhook: - runs-on: ubuntu-latest - steps: - - name: Trigger Vercel deploy webhook - run: | - curl -X POST ${{ secrets.DEPLOY_HOOK }}