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