File tree 3 files changed +41
-2
lines changed
3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 20
20
run : node . run posttest
21
21
env :
22
22
DEPLOY_VERSION : testing
23
-
23
+
24
+ check_docs :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v2
28
+ - name : Use Node.js 14.x
29
+ uses : actions/setup-node@v1
30
+ with :
31
+ node-version : 14.x
32
+ - name : Install dependencies
33
+ run : |
34
+ node . install --ignore-scripts --no-audit
35
+ - name : Rebuild the docs
36
+ run : make freshdocs
37
+ - name : Git should not be dirty
38
+ run : node scripts/git-dirty.js
39
+
40
+
24
41
licenses :
25
42
runs-on : ubuntu-latest
26
43
steps :
Original file line number Diff line number Diff line change @@ -76,6 +76,12 @@ docs/content/using-npm/config.md: scripts/config-doc.js lib/utils/config/*.js
76
76
docs/content/commands/npm-% .md : lib/% .js scripts/config-doc-command.js lib/utils/config/* .js
77
77
node scripts/config-doc-command.js $@ $<
78
78
79
+ freshdocs :
80
+ touch lib/utils/config/definitions.js
81
+ touch scripts/config-doc-command.js
82
+ touch scripts/config-doc.js
83
+ make docs
84
+
79
85
test : dev-deps
80
86
node bin/npm-cli.js test
81
87
@@ -109,4 +115,4 @@ publish: gitclean ls-ok link test smoke-tests docs prune
109
115
release : gitclean ls-ok docs prune
110
116
@bash scripts/release.sh
111
117
112
- .PHONY : all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune
118
+ .PHONY : all latest install dev link docs clean uninstall test man docs-clean docsclean release ls-ok dev-deps prune freshdocs
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env node
2
+ const { spawnSync } = require ( 'child_process' )
3
+ const changes = spawnSync ( 'git' , [ 'status' , '--porcelain' , '-uno' ] )
4
+ const stdout = changes . stdout . toString ( 'utf8' )
5
+ const stderr = changes . stderr . toString ( 'utf8' )
6
+ const { status, signal } = changes
7
+ console . log ( stdout )
8
+ console . error ( stderr )
9
+ if ( status || signal ) {
10
+ console . error ( { status, signal } )
11
+ process . exitCode = status || 1
12
+ }
13
+ if ( stdout . trim ( ) !== '' )
14
+ throw new Error ( 'git dirty' )
15
+ else
16
+ console . log ( 'git clean' )
You can’t perform that action at this time.
0 commit comments