Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,25 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

lighthouse:
name: Lighthouse
needs: deploy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20

- name: npm install, build
run: |
npm install
npm run build

- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.15.x
lhci autorun
Comment on lines +64 to +72
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Lighthouse job is rebuilding the site unnecessarily. Since this job runs after deployment (needs: deploy), it should test the deployed GitHub Pages URL directly rather than rebuilding locally. The lhci autorun command can be configured in lighthouserc.js to test the deployed URL, eliminating the need for these build steps.

Suggested change
- name: npm install, build
run: |
npm install
npm run build
- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.15.x
lhci autorun
# Removed unnecessary local build; test deployed site directly
- name: run Lighthouse CI
run: |
npm install -g @lhci/cli@0.15.x
lhci autorun
env:
LHCI_BUILD_CONTEXT__CURRENT_BRANCH: ${{ github.ref_name }}
LHCI_BUILD_CONTEXT__CURRENT_HASH: ${{ github.sha }}
LHCI_BUILD_CONTEXT__CURRENT_URL: ${{ needs.deploy.outputs.page_url }}

Copilot uses AI. Check for mistakes.
7 changes: 7 additions & 0 deletions lighthouserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
ci: {
upload: {
target: "temporary-public-storage",
},
},
Comment on lines +1 to +6
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Lighthouse configuration is missing a URL to test. The lighthouserc.js file needs a "collect" section that specifies the deployed GitHub Pages URL. Without this, lhci autorun won't know which URL to audit. Consider adding the deployed site URL from the deploy job's output.

Copilot uses AI. Check for mistakes.
};
Loading