Skip to content

Implement Lighthouse in CI Pipeline #4

Implement Lighthouse in CI Pipeline

Implement Lighthouse in CI Pipeline #4

Workflow file for this run

name: PWA Audit
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Run Lighthouse CI
run: lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
- name: List directory contents
run: |
echo "Current directory:"
ls -la
echo "Lighthouse CI directory (if exists):"
ls -la .lighthouseci || echo ".lighthouseci directory not found"
- name: Upload Lighthouse report
uses: actions/upload-artifact@v3
with:
name: lighthouse-report
path: .lighthouseci
if-no-files-found: warn