From 1aa46b4597212562ee0bb0930d18f397d3726154 Mon Sep 17 00:00:00 2001 From: InkoHX Date: Wed, 24 Apr 2024 01:08:02 +0900 Subject: [PATCH] :construction_worker: setup Lighthouse --- .github/workflows/ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c14f9e0..d798243 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,17 @@ jobs: project-id: ${{ secrets.VERCEL_PROJECT_ID }} production: ${{ github.ref == 'refs/heads/main' }} prebuilt: true + + - name: Lighthouse CI - Healthcheck + run: pnpm dlx @lhci/cli@0.13.x healthcheck --fatal + + - name: Lighthouse CI - Collect + run: | + if [ "${{ github.ref }}" = "refs/heads/main" ]; then + pnpm dlx @lhci/cli@0.13.x collect -n 1 --url ${{ steps.vercel.outputs.deployment-url }} --url https://www.nexterias.dev + else + pnpm dlx @lhci/cli@0.13.x collect -n 1 --url ${{ steps.vercel.outputs.deployment-url }} + fi + + - name: Lighthouse CI - Upload + run: pnpm dlx @lhci/cli@0.13.x upload --githubToken ${{ secrets.GITHUB_TOKEN }} --target temporary-public-storage