Skip to content

Commit

Permalink
update ci cd litghthouse
Browse files Browse the repository at this point in the history
  • Loading branch information
FazCodeFR committed Jun 13, 2024
1 parent f486746 commit c2c014f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 32 deletions.
31 changes: 0 additions & 31 deletions .github/workflows/lighthouse-check-github-action.yaml

This file was deleted.

30 changes: 29 additions & 1 deletion .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
name: Vercel Preview Deployment
name: Vercel Preview Deployment and Lighthouse Check

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

on:
push

jobs:
Deploy-Preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install Vercel CLI
run: npm install --global vercel@latest

- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}

- name: Build Project Artifacts
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}

- name: Deploy Project Artifacts to Vercel
id: vercel_deploy
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}

- name: Lighthouse Check
id: lighthouseCheck
uses: foo-software/lighthouse-check-action@master
with:
urls: ${{ steps.vercel_deploy.outputs.preview-url }}
prCommentEnabled: true
gitAuthor: ${{ github.actor }}
gitBranch: ${{ github.ref }}
sha: ${{ github.sha }}

- name: Verify Lighthouse Check results
uses: foo-software/lighthouse-check-status-action@master
with:
lighthouseCheckResults: ${{ steps.lighthouseCheck.outputs.lighthouseCheckResults }}
minAccessibilityScore: "70"
minBestPracticesScore: "50"
minPerformanceScore: "50"
minProgressiveWebAppScore: "50"
minSeoScore: "50"

1 comment on commit c2c014f

@vercel
Copy link

@vercel vercel bot commented on c2c014f Jun 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.