Skip to content

Commit

Permalink
vercel push added v11 - vercel actions
Browse files Browse the repository at this point in the history
  • Loading branch information
datguychen committed Oct 15, 2023
1 parent ebe3f21 commit f8f2bed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/PushWorkflow.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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 }}

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ zzzzkomendy.txt
/playwright-report/
/playwright/.cache/
build
testmoresults/test-results.xml
testmoresults/test-results.xml
.vercel

0 comments on commit f8f2bed

Please sign in to comment.