-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1021 Bytes
/
PushWorkflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: E2E / Sanity / Push
on:
push:
branches:
- main
jobs:
Portfolio_E2E_Push_Main:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Install Playwright
run: npx playwright install --with-deps chromium
- name: Install Vercel CLI
run: npm install -g vercel
- name: Run vercel tests
run: npx playwright test --grep "@vercel" --project="Chrome"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report
retention-days: 5
- name: Build and Deploy to Vercel
if: success()
run: |
npm run build
npx vercel --prod
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Add your Vercel token as a secret in your repository