File tree Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Expand file tree Collapse file tree 4 files changed +7
-15
lines changed Original file line number Diff line number Diff line change 17
17
run : npm ci
18
18
- name : Build with VitePress
19
19
run : |
20
- npm run docs:build-ci
20
+ npm run docs:build
Original file line number Diff line number Diff line change 1
1
import getHrefs from 'get-hrefs'
2
2
import linkCheck from 'link-check'
3
- import { isCIBuild } from './utility.js'
3
+ import { doBuildChecks } from './utility.js'
4
4
5
5
const linkCache = { }
6
6
const linkErrors = [ ]
@@ -12,18 +12,11 @@ const ignores = [
12
12
// Ignore localhost links
13
13
'://localhost' ,
14
14
// Ignore example data
15
- 'http://10.10.10.1' ,
16
- 'http://host:9090' ,
17
- // Ignore datastax links (possibly related to ALPN/HTTP 2.0 resolution:
18
- // https://github.com/tcort/link-check/issues/72; wget and curl do not
19
- // work by default from command line either)
20
- 'https://docs.datastax.com/' ,
21
- 'https://support.cpanel.net/' ,
22
- 'https://forums.cpanel.net' ,
15
+ '://10.10.10.1' ,
23
16
]
24
17
25
18
export function checkExternalLinks ( context , extra_ignores = [ ] ) {
26
- if ( isCIBuild ( ) ) {
19
+ if ( ! doBuildChecks ( ) ) {
27
20
return
28
21
}
29
22
Original file line number Diff line number Diff line change @@ -170,9 +170,8 @@ export function resolveURL(url, base) {
170
170
return ( base . endsWith ( '/' ) ? base . slice ( 0 , - 1 ) : base ) + '/' + url
171
171
}
172
172
173
- export function isCIBuild ( ) {
173
+ export function doBuildChecks ( ) {
174
174
// Running a local dev environment is considered a "CI build", since
175
175
// we should not be doing expensive validity checking
176
- return ( process . env . npm_lifecycle_event === 'docs:build-ci' ) ||
177
- ( process . env . NODE_ENV === 'development' )
176
+ return ( process . env . npm_lifecycle_event === 'docs:build-checks' )
178
177
}
Original file line number Diff line number Diff line change 26
26
"scripts" : {
27
27
"docs:dev" : " vitepress dev" ,
28
28
"docs:build" : " vitepress build" ,
29
- "docs:build-ci " : " vitepress build" ,
29
+ "docs:build-checks " : " vitepress build" ,
30
30
"docs:preview" : " vitepress preview" ,
31
31
"man:build" : " node util/generate_man.js"
32
32
},
You can’t perform that action at this time.
0 commit comments