Skip to content

Optimize Lighthouse performance and accessibility baseline #6

Optimize Lighthouse performance and accessibility baseline

Optimize Lighthouse performance and accessibility baseline #6

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm test
- run: npm run build
- name: Smoke test preview server
run: |
npm run preview -- --host 127.0.0.1 --port 4173 &
PREVIEW_PID=$!
cleanup() {
kill "$PREVIEW_PID" >/dev/null 2>&1 || true
}
trap cleanup EXIT
for i in {1..20}; do
if curl -fsS "http://127.0.0.1:4173/" | grep -qi "<!doctype html>"; then
exit 0
fi
sleep 1
done
echo "Preview smoke check failed"
exit 1
- uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4