File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 branches :
66 - main
77
8+ permissions :
9+ contents : read
10+
811jobs :
912 build :
1013 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 1+ name : Lighthouse CI
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ permissions :
9+ contents : read
10+
11+ jobs :
12+ lighthouse :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Set up Node.js
19+ uses : actions/setup-node@v4
20+ with :
21+ node-version : " 22.12.0"
22+ cache : npm
23+ cache-dependency-path : astro-site/package-lock.json
24+
25+ - name : Install dependencies
26+ working-directory : astro-site
27+ run : npm ci
28+
29+ - name : Create assets symlink
30+ run : mkdir -p astro-site/src/content && ln -s ../../../assets astro-site/src/content/assets
31+
32+ - name : Build site
33+ working-directory : astro-site
34+ run : npm run build
35+
36+ - name : Lighthouse CI
37+ uses : treosh/lighthouse-ci-action@v12
38+ with :
39+ configPath : ./lighthouserc.json
40+ uploadArtifacts : true
Original file line number Diff line number Diff line change 1+ {
2+ "ci" : {
3+ "collect" : {
4+ "staticDistDir" : " ./astro-site/dist" ,
5+ "url" : [
6+ " /" ,
7+ " /introduction/" ,
8+ " /building-blocks/" ,
9+ " /branching-and-merging/"
10+ ]
11+ },
12+ "assert" : {
13+ "assertions" : {
14+ "categories:performance" : [" warn" , { "minScore" : 0.9 }],
15+ "categories:accessibility" : [" error" , { "minScore" : 0.9 }],
16+ "categories:best-practices" : [" warn" , { "minScore" : 0.9 }],
17+ "categories:seo" : [" warn" , { "minScore" : 0.9 }]
18+ }
19+ }
20+ }
21+ }
You can’t perform that action at this time.
0 commit comments