diff --git a/.github/workflows/lighthouse-check-github-action.yaml b/.github/workflows/lighthouse-check-github-action.yaml new file mode 100644 index 0000000..34c1c8a --- /dev/null +++ b/.github/workflows/lighthouse-check-github-action.yaml @@ -0,0 +1,31 @@ +name: Lighthouse +on: [pull_request] + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: amondnet/vercel-action@v20 + with: + vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required + github-token: ${{ secrets.GITHUB_TOKEN }} + vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} #Required + vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}} #Required + - name: Lighthouse + uses: foo-software/lighthouse-check-action@master + with: + urls: ${{ steps.now.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" \ No newline at end of file