File tree 1 file changed +45
-7
lines changed
1 file changed +45
-7
lines changed Original file line number Diff line number Diff line change 5
5
push :
6
6
7
7
jobs :
8
- build :
8
+ deploy-openapi :
9
9
runs-on : ubuntu-latest
10
10
steps :
11
11
- uses : actions/checkout@v4
@@ -22,20 +22,58 @@ jobs:
22
22
timeout 300 sh -c 'until curl -s localhost:8080/v3/api-docs; do sleep 5; done'
23
23
env :
24
24
SPRING_PROFILES_ACTIVE : local
25
+ - name : Bundle OpenAPI specs
26
+ run : |
27
+ mkdir openapi
28
+ curl -sf localhost:8080/v3/api-docs -o openapi/api-docs.json
29
+ working-directory : .
30
+ - uses : actions/upload-artifact@v4
31
+ with :
32
+ name : openapi
33
+ path : openapi/
34
+ - name : Deploy OpenAPI
35
+ uses : JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
36
+ with :
37
+ folder : openapi
38
+ target-folder : openapi
39
+
40
+ build-docs :
41
+ runs-on : ubuntu-latest
42
+ needs :
43
+ - deploy-openapi
44
+ steps :
45
+ - uses : actions/checkout@v4
25
46
- uses : ruby/setup-ruby@v1
26
47
with :
27
48
ruby-version : 3.1
28
49
bundler-cache : true
29
50
working-directory : tech-docs
30
- - name : Build
51
+ - name : Build Docs
31
52
run : |
32
53
gem install middleman
33
54
bundle exec middleman build --verbose
34
55
working-directory : tech-docs
35
- - name : Bundle OpenAPI specs
36
- run : |
37
- curl -sf localhost:8080/v3/api-docs -o api-docs.json
38
- working-directory : tech-docs/build
39
56
- uses : actions/upload-artifact@v4
40
57
with :
41
- path : tech-docs/build
58
+ name : documentation
59
+ path : tech-docs/build/
60
+
61
+ deploy-docs :
62
+ runs-on : ubuntu-latest
63
+ if : github.ref_name == 'main' || (github.event_name == 'workflow_dispatch')
64
+ needs :
65
+ - build-docs
66
+ steps :
67
+ - uses : actions/checkout@v4
68
+ - uses : actions/download-artifact@v4
69
+ with :
70
+ name : documentation
71
+ path : tech-docs-build
72
+ - uses : actions/download-artifact@v4
73
+ with :
74
+ name : openapi
75
+ path : tech-docs-build
76
+ - name : Deploy
77
+ uses : JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
78
+ with :
79
+ folder : tech-docs-build
You can’t perform that action at this time.
0 commit comments