From ea20fd92e9acd3f20412de37043838fbc9450fa2 Mon Sep 17 00:00:00 2001 From: Jenin Date: Sun, 12 May 2024 12:38:48 +0530 Subject: [PATCH] ci cd fix --- .github/workflows/preview.yaml | 21 --------------------- .github/workflows/production.yaml | 21 --------------------- .github/workflows/vercel.yaml | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 42 deletions(-) delete mode 100644 .github/workflows/preview.yaml delete mode 100644 .github/workflows/production.yaml create mode 100644 .github/workflows/vercel.yaml diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml deleted file mode 100644 index 47970758c..000000000 --- a/.github/workflows/preview.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Vercel Preview Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - push: - branches: - - dev-server -jobs: - Deploy-Preview: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Install Vercel CLI - run: npm install --global vercel@latest - - name: Pull Vercel Environment Information - run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} - - name: Build Project Artifacts - run: vercel build --token=${{ secrets.VERCEL_TOKEN }} - - name: Deploy Project Artifacts to Vercel - run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/production.yaml b/.github/workflows/production.yaml deleted file mode 100644 index e0e783018..000000000 --- a/.github/workflows/production.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Vercel Production Deployment -env: - VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} - VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} -on: - push: - branches: - - dev-server -jobs: - Deploy-Production: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - 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/.github/workflows/vercel.yaml b/.github/workflows/vercel.yaml new file mode 100644 index 000000000..65d0b799c --- /dev/null +++ b/.github/workflows/vercel.yaml @@ -0,0 +1,23 @@ +name: Deploy to Vercel + +on: + push: + branches: + - dev-server + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build + + - name: Deploy to Vercel + run: vercel --token ${{ secrets.VERCEL_TOKEN }} --prod