-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (38 loc) · 1.48 KB
/
lhci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Lighthouse CI
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Triggers the workflow when pull request is opened or updated
pull_request:
types: [opened, synchronize, reopened, labeled]
jobs:
lighthouseci:
# Run this job if labeled with 'ci-lighthouse'
if: ${{ github.event.label.name == 'ci-lighthouse' }}
runs-on: ubuntu-latest
steps:
#ref: https://github.com/actions/starter-workflows/tree/main/pages
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Setup Ruby
# https://github.com/ruby/setup-ruby/releases/tag/v1.207.0
uses: ruby/setup-ruby@4a9ddd6f338a97768b8006bf671dfbad383215f4
with:
ruby-version: '3.1' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
# Fix gemfile not found issue
- name: Bundle init
run: bundle init && bundle add jekyll
# Lighthiuse CI
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install -g @lhci/cli@0.11.x
# Collect Lighthouse results
- run: lhci autorun
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}