Lighthouse Report Cron #46
This file contains 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 Report Cron | |
on: | |
schedule: | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
inputs: | |
environment: | |
description: 'Environment to run LHCI against' | |
required: false | |
default: 'prod' | |
type: choice | |
options: | |
- stage | |
- prod | |
jobs: | |
lhci: | |
name: Lighthouse Report - ${{ inputs.environment != null && inputs.environment || 'prod' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js 20.9.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.9.x | |
- name: Run Lighthouse CI | |
run: | | |
npm install -g @lhci/[email protected] | |
npm run lighthouse | |
env: | |
LIGHTHOUSE_COLLECT_URL: ${{ secrets.LIGHTHOUSE_COLLECT_URL }} | |
- name: Report results | |
run: npm run cron:report-lighthouse-results |