File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,14 @@ jobs:
94
94
echo "[INFO] Starting Antora build..."
95
95
npm run build:docs
96
96
echo "[INFO] Antora build completed."
97
+ - store_artifacts :
98
+ path : build
97
99
- run :
98
100
name : Create ZIP Archive of Build
99
101
command : |
100
102
set -e
101
103
echo "[INFO] Creating zip archive of build directory..."
102
104
zip -r build.zip build/
103
- - store_artifacts :
104
- path : build.zip
105
- destination : preview-site.zip
106
105
- persist_to_workspace :
107
106
root : .
108
107
paths :
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package main
2
2
3
3
import (
4
4
"context"
5
+ "errors"
5
6
"flag"
6
7
"fmt"
7
8
"io"
@@ -33,6 +34,8 @@ type options struct {
33
34
BaseURL string
34
35
}
35
36
37
+ var errFailures = errors .New ("failed validation" )
38
+
36
39
func main () {
37
40
ctx := context .Background ()
38
41
@@ -54,9 +57,13 @@ func main() {
54
57
}
55
58
56
59
err := run (ctx , opts )
57
- if err != nil {
60
+ switch {
61
+ case errors .Is (err , errFailures ):
62
+ os .Exit (1 )
63
+ case err != nil :
58
64
slog .Error ("Unexpected error" , "error" , err )
59
65
os .Exit (1 )
66
+ default :
60
67
}
61
68
}
62
69
@@ -98,7 +105,7 @@ func run(ctx context.Context, opts options) error {
98
105
for _ , fail := range failures {
99
106
slog .Warn (" " + fail )
100
107
}
101
- return nil
108
+ return errFailures
102
109
}
103
110
104
111
slog .Info ("Success" )
You can’t perform that action at this time.
0 commit comments