vercel push added v2 #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |