Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Update dependency @astrojs/vercel to v4.0.4 #5723

Update dependency @astrojs/vercel to v4.0.4

Update dependency @astrojs/vercel to v4.0.4 #5723

Workflow file for this run

name: Main
on: [push]
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1
- name: Setup Node.js
uses: ./.github/actions/setup-nodejs
- name: Check source code
run: |
npx astro sync
npm run lint
npm run check:astro
npm run copy:paste:detector
- name: Compile source code
run: npm run compile
- name: Run unit tests
run: npm run test:unit:coverage
- name: Upload code coverage artifact
uses: actions/upload-artifact@v3
with:
name: code-coverage
path: target/coverage/clover.xml
retention-days: 1
if-no-files-found: error
deploy-to-vercel:
name: Deploy to Vercel
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: [tests]
concurrency:
group: deploy-to-vercel
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
steps:
- name: Checkout code
uses: nschloe/action-cached-lfs-checkout@v1
- name: Setup Node.js
uses: ./.github/actions/setup-nodejs
- name: Deploy Project to Vercel
run: npx vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}
coverage:
name: Upload code coverage
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
needs: deploy-to-vercel
continue-on-error: true
steps:
- name: Download code coverage artifact
uses: actions/download-artifact@v3
with:
name: code-coverage
path: target/coverage
- name: Upload code coverage
uses: codecov/codecov-action@v3
with:
files: target/coverage/clover.xml
fail_ci_if_error: true