https://github.com/OskarAhl/Lighthouse-github-action-comment
Automated lighthouse metrics as a comment to your Vercel PR
https://github.com/OskarAhl/Lighthouse-github-action-comment
google lighthouse vercel zeit
Last synced: 5 months ago
JSON representation
Automated lighthouse metrics as a comment to your Vercel PR
- Host: GitHub
- URL: https://github.com/OskarAhl/Lighthouse-github-action-comment
- Owner: OskarAhl
- Created: 2020-10-14T14:14:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-02T16:05:01.000Z (almost 4 years ago)
- Last Synced: 2024-08-04T01:25:19.854Z (9 months ago)
- Topics: google, lighthouse, vercel, zeit
- Language: HTML
- Homepage: https://github.com/OskarAhl/Lighthouse-github-action-comment/pull/1
- Size: 10.7 KB
- Stars: 60
- Watchers: 2
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-list - Lighthouse-github-action-comment
README
### 🚀 Automated Lighthouse metrics to your PR with Vercel and Github Actions.
The complete action can be found in [Lighthouse-github-action/.github/workflows/](https://github.com/OskarAhl/Lighthouse-github-action/blob/main/.github/workflows/lighthouse-on-vercel-preview-url.yml)

### Action workflow
1. Get the preview url for the PR (from Vercel).
2. Run a Lighthouse audit on the preview url.
3. Format the score to a table (+throw in a few emojis).
4. Post a comment on the PR with the formatted score.### Integrations used:
* [treosh/lighthouse-ci-action](https://github.com/treosh/lighthouse-ci-action)
* [sticky-pull-request-comment](https://github.com/marketplace/actions/sticky-pull-request-comment)
* [vercel-preview-url-action](https://github.com/marketplace/actions/capture-vercel-preview-url)### Limitations:
* Always runs the Lighthouse audit on the root page.### Potential future improvements:
* Combine the action with a budget to prevent PRs that bring the metrics below a set treshhold.
* Run the audit only on the pages affected by the PR.
* Compare the collected metrics with the actual metrics of your production site.