File tree Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Expand file tree Collapse file tree 2 files changed +45
-1
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - production
7+
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+ cancel-in-progress : true
11+
12+ jobs :
13+ compile :
14+ name : Compiles
15+ runs-on : ubuntu-latest
16+ steps :
17+ - uses : actions/checkout@v4
18+ with :
19+ fetch-depth : 1
20+ - uses : actions/setup-node@v4
21+ with :
22+ node-version : 22
23+
24+ - name : Get npm cache directory
25+ id : npm-cache-dir
26+ shell : bash
27+ run : echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
28+
29+ - uses : actions/cache@v4
30+ id : npm-cache
31+ with :
32+ path : ${{ steps.npm-cache-dir.outputs.dir }}
33+ key : ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
34+ restore-keys : |
35+ ${{ runner.os }}-node-
36+
37+ - run : npm ci
38+
39+ - run : npx astro build
40+ env :
41+ NODE_OPTIONS : " --max-old-space-size=4192"
42+
43+ - name : Check - Validate redirects (infinite loops, sources with fragment)
44+ run : npx tsm bin/validate-redirects.ts
Original file line number Diff line number Diff line change 11import { readFile } from 'fs/promises' ;
22
33async function main ( ) {
4- const redirects = await readFile ( 'content /_redirects' , { encoding : 'utf-8' } ) ;
4+ const redirects = await readFile ( 'public /_redirects' , { encoding : 'utf-8' } ) ;
55
66 let numInfiniteRedirects = 0 ;
77 let numUrlsWithFragment = 0 ;
You can’t perform that action at this time.
0 commit comments