From f8f2bed75565410d3aef83b36735e5edea12ada2 Mon Sep 17 00:00:00 2001 From: datguychen Date: Sun, 15 Oct 2023 10:20:23 +0200 Subject: [PATCH] vercel push added v11 - vercel actions --- .github/workflows/PushWorkflow.yml | 20 +++++++------------- .gitignore | 3 ++- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/PushWorkflow.yml b/.github/workflows/PushWorkflow.yml index 07a9267..df50e55 100644 --- a/.github/workflows/PushWorkflow.yml +++ b/.github/workflows/PushWorkflow.yml @@ -1,5 +1,9 @@ name: E2E / Sanity / Push +env: + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + on: push: branches: @@ -9,8 +13,6 @@ jobs: Portfolio_E2E_Push_Main: timeout-minutes: 30 runs-on: ubuntu-latest - env: - ESLINT_DISABLED: true steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -23,9 +25,7 @@ jobs: - name: Install Playwright run: npx playwright install --with-deps chromium - name: Install Vercel CLI - run: npm install -g vercel - - name: Login to Vercel - run: npx vercel login ${{ secrets.VERCEL_TOKEN }} + run: npm install --global vercel@latest - name: Run vercel tests run: npx playwright test --grep "@vercel" --project="Chrome" - name: Upload test results @@ -37,14 +37,8 @@ jobs: retention-days: 5 - name: Build for Vercel if: success() - run: | - npm run build - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} - name: Push to Vercel if: success() - run: | - npx vercel --prod --yes - env: - VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index db44ccd..3aa553c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ zzzzkomendy.txt /playwright-report/ /playwright/.cache/ build -testmoresults/test-results.xml \ No newline at end of file +testmoresults/test-results.xml +.vercel