-
Notifications
You must be signed in to change notification settings - Fork 13
63 lines (52 loc) · 1.86 KB
/
lighthouse.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Run Lighthouse against the docs
on:
# Run every night at midnight UTC.
schedule:
- cron: '0 0 * * *'
jobs:
lighthouseci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install Node and configure its cache.
- uses: actions/setup-node@v3
with:
node-version: 16
# https://github.com/actions/cache/blob/master/examples.md#node---yarn
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# Install Ruby and configure the Bundler cache.
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.0
# https://github.com/actions/cache/blob/master/examples.md#ruby---bundler
- name: Set up Bundler cache
uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
# Build the documentation site.
# This is needed so we can determine the list of URLs to test.
- name: Build documentation site
run: yarn build-netlify
# Run Lighthouse CI
- name: Run Lighthouse CI
run: yarn lhci autorun
env:
LHCI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Attach results as artifact to GitHub Actions run
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: lighthouse-results
path: .lighthouseci