File tree 1 file changed +36
-7
lines changed
1 file changed +36
-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,49 @@ 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
+ - name : Deploy OpenAPI
31
+ uses : JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
32
+ with :
33
+ folder : openapi
34
+ target-folder : openapi
35
+
36
+ build-docs :
37
+ runs-on : ubuntu-latest
38
+ needs :
39
+ - deploy-openapi
40
+ steps :
25
41
- uses : ruby/setup-ruby@v1
26
42
with :
27
43
ruby-version : 3.1
28
44
bundler-cache : true
29
45
working-directory : tech-docs
30
- - name : Build
46
+ - name : Build Docs
31
47
run : |
32
48
gem install middleman
33
49
bundle exec middleman build --verbose
34
50
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
51
- uses : actions/upload-artifact@v4
40
52
with :
41
- path : tech-docs/build
53
+ name : documentation
54
+ path : tech-docs/build/
55
+
56
+ deploy-docs :
57
+ runs-on : ubuntu-latest
58
+ if : github.ref_name == 'main' || (github.event_name == 'workflow_dispatch')
59
+ needs :
60
+ - build-docs
61
+ steps :
62
+ - uses : actions/checkout@v4
63
+ - uses : actions/download-artifact@v4
64
+ with :
65
+ name : documentation
66
+ path : tech-docs-build
67
+ - name : Deploy
68
+ uses : JamesIves/github-pages-deploy-action@920cbb300dcd3f0568dbc42700c61e2fd9e6139c # v4.6.4
69
+ with :
70
+ folder : tech-docs-build
You can’t perform that action at this time.
0 commit comments