Skip to content

feat: lighthouse setting #2

feat: lighthouse setting

feat: lighthouse setting #2

Workflow file for this run

name: lighthouse
on:
workflow_dispatch:
pull_request:
branches:
- "main"
- "dev"
types:
- opened
- synchronize
jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run lighthouse
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- run: |
npm install && npm add -g @lhci/cli
npm run build
lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: Format lighthouse score
id: format_lighthouse_score
uses: actions/github-script@v6
with:
script: |
const script = require('./scripts/lhciFormat.js')
await script({core})
- name: comment result
uses: unsplash/[email protected]
with:
msg: ${{ steps.format_lighthouse_score.outputs.comments}}