File tree Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Expand file tree Collapse file tree 2 files changed +34
-1
lines changed Original file line number Diff line number Diff line change
1
+ name : Generate Documentation Model
2
+
3
+ on :
4
+ push :
5
+
6
+ jobs :
7
+ docmodel :
8
+ name : Generate Documentation Model
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout repo
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Setup Node.js
15
+ uses : actions/setup-node@v4
16
+ with :
17
+ node-version : " >=23.6.0"
18
+
19
+ - name : Install dependencies (with cache)
20
+ uses : bahmutov/npm-install@v1
21
+
22
+ - name : Generate documentation model
23
+ run : npm run docmodel
24
+
25
+ - name : Upload documentation model artifact
26
+ uses : actions/upload-artifact@v4
27
+ with :
28
+ name : client-api-documentation
29
+ path : docs/public/client.api.json
30
+ retention-days : 30
Original file line number Diff line number Diff line change 85
85
) ;
86
86
87
87
await buildReport ( "@apollo/client" , entryPointFile , "docModel" ) ;
88
+ if ( process . exitCode === 50 ) {
89
+ process . exitCode = 0 ; // if there were only warnings, we still want to exit with 0
90
+ }
88
91
}
89
92
90
93
if ( parsed . values . generate ?. includes ( "apiReport" ) ) {
@@ -164,6 +167,7 @@ async function buildReport(
164
167
if ( extractorResult . succeeded ) {
165
168
console . log ( `✅ API Extractor completed successfully` ) ;
166
169
} else {
170
+ process . exitCode = extractorResult . errorCount === 0 ? 50 : 1 ;
167
171
console . error (
168
172
`❗ API Extractor completed with ${ extractorResult . errorCount } errors` +
169
173
` and ${ extractorResult . warningCount } warnings`
@@ -180,6 +184,5 @@ async function buildReport(
180
184
}
181
185
) ;
182
186
}
183
- process . exitCode = 1 ;
184
187
}
185
188
}
You can’t perform that action at this time.
0 commit comments