Lighthouse Monitor (Scheduled) #41
This file contains hidden or 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: Lighthouse Monitor (Scheduled) | |
| on: | |
| schedule: | |
| # Run daily at 2 AM UTC | |
| - cron: '0 2 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| monitor: | |
| runs-on: ubuntu-latest | |
| environment: Actions | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: v2.x | |
| - name: Build site | |
| env: | |
| API_URL: ${{ secrets.API_URL }} | |
| API_TOKEN: ${{ secrets.API_TOKEN }} | |
| run: deno task build | |
| - name: Optimize build | |
| run: deno task optimize:build | |
| - name: Run Lighthouse CI | |
| uses: treosh/lighthouse-ci-action@v12 | |
| with: | |
| configPath: ./lighthouserc.json | |
| temporaryPublicStorage: true | |
| uploadArtifacts: true | |
| runs: 3 | |
| - name: Upload monitoring results | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: lighthouse-monitoring-${{ github.run_number }} | |
| path: .lighthouseci | |
| retention-days: 90 |