@@ -30,20 +30,26 @@ jobs:
30
30
uses : actions/checkout@v4
31
31
32
32
- name : Set up mdBook 📚
33
+ if : matrix.service == 'account' # Only upload mdbook once
33
34
uses : ./.github/workflows/common/set-up-mdbook
34
35
with :
35
36
token : ${{secrets.GITHUB_TOKEN}}
36
37
- name : Setup Pages
38
+ if : matrix.service == 'account' # Only setup Pages once
37
39
id : pages
38
40
uses : actions/configure-pages@v4
39
41
40
42
- name : Build with mdBook
43
+ if : matrix.service == 'account' # Only build mdbook once
41
44
working-directory : docs
42
45
run : mdbook build && ls book
43
46
44
- - name : Upload artifact
45
- uses : actions/upload-pages-artifact@v3
47
+ # Upload the mdBook output to GitHub Pages
48
+ - name : Upload mdbook to GitHub Pages
49
+ if : matrix.service == 'account' # Only upload mdbook once
50
+ uses : actions/upload-artifact@v3
46
51
with :
52
+ name : mdbook
47
53
path : ./docs/book
48
54
49
55
# Publish OpenAPI specs for each microservice
@@ -52,19 +58,53 @@ jobs:
52
58
with :
53
59
service : ${{ matrix.service }}
54
60
55
- - name : Publish OpenAPI UI to GitHub Pages
61
+ - name : Upload OpenAPI UI to GitHub Pages
56
62
uses : actions/upload-pages-artifact@v3
57
63
with :
64
+ name : openapi-${{ matrix.service }}
58
65
path : ./docs/${{ matrix.service }}
59
66
60
67
# Deployment job
61
68
deploy :
69
+ runs-on : ubuntu-latest
70
+ needs : build
62
71
environment :
63
72
name : github-pages
64
73
url : ${{ steps.deployment.outputs.page_url }}
65
- runs-on : ubuntu-latest
66
- needs : build
67
74
steps :
75
+ - name : Checkout
76
+ uses : actions/checkout@v4
77
+
78
+ - name : Download mdbook artifact
79
+ uses : actions/download-artifact@v3
80
+ with :
81
+ name : mdbook
82
+ path : ./docs/book
83
+
84
+ - name : Download account OpenAPI artifacts
85
+ uses : actions/download-artifact@v3
86
+ with :
87
+ name : openapi-account
88
+ path : ./docs/account
89
+
90
+ - name : Download content-watcher OpenAPI artifacts
91
+ uses : actions/download-artifact@v3
92
+ with :
93
+ name : openapi-content-watcher
94
+ path : ./docs/content-watcher
95
+
96
+ - name : Download content-publishing OpenAPI artifacts
97
+ uses : actions/download-artifact@v3
98
+ with :
99
+ name : openapi-content-publishing
100
+ path : ./docs/content-publishing
101
+
102
+ - name : Download graph OpenAPI artifacts
103
+ uses : actions/download-artifact@v3
104
+ with :
105
+ name : openapi-graph
106
+ path : ./docs/graph
107
+
68
108
- name : Deploy to GitHub Pages
69
109
id : deployment
70
110
uses : actions/deploy-pages@v4
0 commit comments