Automatically update your pinned gist with your site's Lighthouse metrics.
- 5 Lighthouse categories: Performance, Accessibility, Best Practices, SEO, and PWA
- Emoji badges: Optional visual indicators for scores
- Pinned Gist: Perfect for your GitHub profile
- Automatic updates: Schedule daily runs with GitHub Actions
Note: This action uses two versions of Lighthouse to provide complete metrics:
- Lighthouse 13 for Performance, Accessibility, Best Practices, and SEO
- Lighthouse 11 for PWA (Progressive Web App) category
This is because Google removed the PWA category from Lighthouse 12+. We use Lighthouse 11 specifically to preserve PWA scoring with full service worker checks.
- Create a token in your GitHub account settings with the
gist scopeonly and copy it - Create a new public Gist and copy ID from url (string after last slash)
- Fork this repo
- Go to Settings > Secrets > Actions secrets in your fork
- Create new Environment secrets:
GH_TOKEN: GitHub token generated earlierGIST_ID: your Gist IDTEST_URL: URL to run Lighthouse on
It's all. Go to Actions > Lighthouse Metrics and Run workflow. Gist should update and show Lighthouse metrics. Next, statistics will be updated automatically every day. Pin this gist on your profile!
- name: Lighthouse Box
uses: abordage/lighthouse-box@v3
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIST_ID: ${{ secrets.GIST_ID }}
TEST_URL: 'https://example.com'- name: Lighthouse Box
uses: abordage/lighthouse-box@v3
with:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIST_ID: ${{ secrets.GIST_ID }}
TEST_URL: 'https://example.com'
GIST_TITLE: 'My Portfolio'
FORM_FACTOR: 'desktop'
RESULT_BADGE: 'true'
PRINT_SUMMARY: 'true'| Input | Description | Required | Default |
|---|---|---|---|
GH_TOKEN |
GitHub token with gist scope | Yes | - |
GIST_ID |
ID of the Gist to update | Yes | - |
TEST_URL |
URL to run Lighthouse audit on | Yes | - |
GIST_TITLE |
Custom title for the Gist (before date) | No | My website |
FORM_FACTOR |
Device type: mobile or desktop |
No | mobile |
PRINT_SUMMARY |
Print summary to GitHub Actions | No | true |
RESULT_BADGE |
Show emoji badges in Gist | No | false |
If you have any feedback, comments or suggestions, please feel free to open an issue within this repository.
Please see CONTRIBUTING for details.
- Pavel Bychko (abordage)
- All Contributors
The MIT License (MIT). Please see License File for more information.