Skip to content

Commit

Permalink
feat(lighthouse): update lighthouse badges
Browse files Browse the repository at this point in the history
  • Loading branch information
teomrd committed Nov 13, 2024
1 parent 413f10a commit 07b6e04
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 5 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/on-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Generate Lighthouse Badges
on:
push:
branches:
- lighthouse-badges
jobs:
generate-lighthouse-badges:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run Lighthouse and generate badges
run: |
make lighthouse-badges
- name: Push badges to repo
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
git add ./docs/lighthouse
git commit -m "Update Lighthouse badges"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ checks: install compile build verify-formatting lint
lighthouse-audit: install build
lhci autorun

lighthouse-badges:
npx lighthouse-badges -o docs/lighthouse/badges -u https://teomrd.github.io/miropad/

clean:
deno clean
rm -rf ./node_modules
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

> Temporary note keeping app for the browser
## Lighthouse Audit scores

[![Lighthouse Performance Badge](./docs/lighthouse/badges/lighthouse_performance.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse Accessibility Badge](./docs/lighthouse/badges/lighthouse_accessibility.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse Best Practices Badge](./docs/lighthouse/badges/lighthouse_best-practices.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse SEO Badge](./docs/lighthouse/badges/lighthouse_seo.svg)](https://github.com/emazzotta/lighthouse-badges)

## Usage

```commands
Expand Down Expand Up @@ -31,9 +38,4 @@ following the pattern.

`git config commit.template ./.gitmessage`

## Lighthouse Audit results

[![Lighthouse Performance Badge](./docs/lighthouse/lighthouse_performance.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse Accessibility Badge](./docs/lighthouse/lighthouse_accessibility.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse Best Practices Badge](./docs/lighthouse/lighthouse_best-practices.svg)](https://github.com/emazzotta/lighthouse-badges)
[![Lighthouse SEO Badge](./docs/lighthouse/lighthouse_seo.svg)](https://github.com/emazzotta/lighthouse-badges)
File renamed without changes
File renamed without changes

0 comments on commit 07b6e04

Please sign in to comment.