-
Notifications
You must be signed in to change notification settings - Fork 1.8k
39 lines (36 loc) · 1.17 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
name: Lighthouse
on:
pull_request:
paths-ignore:
- 'content/**/*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
# Build needs around 400 seconds on Netlify.
# We can not rely on "Waiting for 200", since the user
# might push another commit to an existing PR, meaning
# the deploy preview is already online.
- name: Sleep 400 seconds
run: sleep 400
- name: Waiting for 200 from the Netlify Preview
uses: jakepartusch/wait-for-netlify-action@v1
id: wait-for-netflify-preview
with:
site_name: 'docs-nestjs'
max_timeout: 600
- name: Run Lighthouse on urls and validate with lighthouserc
uses: treosh/lighthouse-ci-action@v12
with:
urls: |
${{ steps.wait-for-netflify-preview.outputs.url }}
${{ steps.wait-for-netflify-preview.outputs.url }}/first-steps
runs: 5
configPath: './lighthouserc.json'
uploadArtifacts: true
temporaryPublicStorage: true