feat: wip site structure for better findability #3
Workflow file for this run
This file contains 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: Audit Web Vitals | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
jobs: | |
lhci: | |
name: Run Lighthouse | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18.17.1 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Site | |
run: npm run build | |
- name: Install Lighthouse CLI | |
run: npm install -g @lhci/[email protected] | |
- name: Run Lighthouse CLI | |
run: lhci autorun | |
env: | |
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }} | |
- name: Post Lighthouse Scores (per page) | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const lighthouseScript = require('.github/workflows/lighthouseScores.cjs') | |
console.log(lighthouseScript({github, context})) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |