fix linting workflow and add lighthouse testing

This commit is contained in:
edideaur 2026-04-05 19:39:41 +00:00 committed by GitHub
parent 5198e5ddac
commit f0c976206e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 44 additions and 0 deletions

View file

@ -104,6 +104,7 @@ jobs:
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git pull --rebase origin main
git add public/editors-picks.json public/editors-picks-old/
git diff --staged --quiet && echo "No changes to commit." && exit 0
git commit -m "chore: update editors picks"

43
.github/workflows/lighthouse.yml vendored Normal file
View file

@ -0,0 +1,43 @@
name: Lighthouse
on:
workflow_dispatch:
push:
branches: [main]
jobs:
lighthouse:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Preview build
run: npm run preview &
continue-on-error: true
- name: Wait for preview server
run: sleep 10
- name: Run Lighthouse
run: |
npx lhci autorun --config=.lhci.yml || true
- name: Upload results
if: always()
uses: actions/upload-artifact@v4
with:
name: lighthouse-results
path: .lighthouseci/