-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.1 KB
/
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
42
43
44
45
46
47
48
name: E2E / Sanity / Push
on:
push:
branches:
- main
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
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 for Vercel
if: success()
run: |
npm run build
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
- name: Push to Vercel
if: success()
run: |
npx vercel --prod --confirm
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}