feat: author site copy once in content/, generate HTML + JSON-LD + ll… #8
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: CI | |
| on: | |
| push: | |
| pull_request: | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Lint, validate, and test | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Content generator checks | |
| run: | | |
| npm run content:test | |
| npm run content:check | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | |
| - name: Install Playwright browsers | |
| run: npx playwright install --with-deps chromium firefox webkit | |
| - name: Set CHROME_PATH for Lighthouse | |
| run: echo "CHROME_PATH=$(node -e "console.log(require('@playwright/test').chromium.executablePath())")" >> "$GITHUB_ENV" | |
| - name: HTML validation | |
| run: | | |
| python3 -m http.server 8080 >/dev/null 2>&1 & | |
| SERVER_PID=$! | |
| trap 'kill $SERVER_PID 2>/dev/null || true' EXIT | |
| for i in $(seq 1 30); do | |
| curl -s -o /dev/null http://localhost:8080 && break | |
| sleep 1 | |
| done | |
| npm run test:html | |
| - name: CSS lint | |
| run: npm run test:lint | |
| - name: Lighthouse | |
| run: | | |
| python3 -m http.server 8080 >/dev/null 2>&1 & | |
| SERVER_PID=$! | |
| trap 'kill $SERVER_PID 2>/dev/null || true' EXIT | |
| for i in $(seq 1 30); do | |
| curl -s -o /dev/null http://localhost:8080 && break | |
| sleep 1 | |
| done | |
| npm run test:lighthouse | |
| - name: Playwright tests | |
| run: npm run test | |
| - name: Upload Playwright report | |
| uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: playwright-report | |
| path: playwright-report/ | |
| retention-days: 7 |