name: CI & Lighthouse on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: '20' cache: 'npm' - name: Install dependencies run: npm ci - name: Build project run: npm run build - name: Run Lighthouse audit uses: lighthouse-checker/action@v1 with: urls: | http://localhost:8080/ prComment: true serverCommand: 'npm run preview -- --port 8080' waitForServer: true