-
Notifications
You must be signed in to change notification settings - Fork 1
Add report file and workflow file #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds Lighthouse CI integration to automatically generate public performance reports for the deployed GitHub Pages site. The workflow runs after successful deployment to audit the site's performance, accessibility, best practices, and SEO metrics.
Key Changes:
- New
lighthouserc.jsconfiguration file for Lighthouse CI with temporary public storage - New
lighthousejob in the deploy workflow that runs after site deployment
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lighthouserc.js | Adds Lighthouse CI configuration with temporary public storage for report uploads |
| .github/workflows/deploy.yml | Adds new lighthouse job that installs dependencies, builds the site, and runs Lighthouse CI audits after deployment |
| - 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 |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
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.
| - 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 }} |
| module.exports = { | ||
| ci: { | ||
| upload: { | ||
| target: "temporary-public-storage", | ||
| }, | ||
| }, |
Copilot
AI
Dec 15, 2025
There was a problem hiding this comment.
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.
Related issue #39
This PR proposes to add a workflow which generates a (public) lighthouse report.