The complete action can be found in Lighthouse-github-action/.github/workflows/
- Get the preview url for the PR (from Vercel).
- Run a Lighthouse audit on the preview url.
- Format the score to a table (+throw in a few emojis).
- Post a comment on the PR with the formatted score.
- Always runs the Lighthouse audit on the root page.
- 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.