-
Notifications
You must be signed in to change notification settings - Fork 20
235 lines (204 loc) · 8.4 KB
/
documentation-deploy-stage-dev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
name: Deploy documentation and storybook artifacts to DEV stage
on:
workflow_dispatch:
workflow_run:
workflows: [Release RC]
types: [completed]
jobs:
deploy:
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
show-progress: false
- name: Prepare environment
uses: ./.github/actions/prepare-environment
- name: Lerna bootstrap
run: npx lerna bootstrap
- name: Prepare directories
run: |
mkdir -p s3_build s3_build_sb
- name: Plasma Website
run: |
npm run build --prefix="./website/plasma-website"
cp -R ./website/plasma-website/build ./s3_build/next-${{ github.sha }}
- name: Plasma UI Docs
run: |
npm run build --prefix="./website/plasma-ui-docs"
cp -R ./website/plasma-ui-docs/build ./s3_build/next-${{ github.sha }}/ui
- name: Plasma Web Docs
run: |
npm run build --prefix="./website/plasma-web-docs"
cp -R ./website/plasma-web-docs/build ./s3_build/next-${{ github.sha }}/web
- name: Plasma B2C Docs
run: |
npm run build --prefix="./website/plasma-b2c-docs"
cp -R ./website/plasma-b2c-docs/build ./s3_build/next-${{ github.sha }}/b2c
- name: Plasma SDDS SERV Docs
run: |
npm run build --prefix="./website/sdds-serv-docs"
cp -R ./website/sdds-serv-docs/build ./s3_build/next-${{ github.sha }}/sdds-serv
- name: Plasma SDDS CS Docs
run: |
npm run build --prefix="./website/sdds-cs-docs"
cp -R ./website/sdds-cs-docs/build ./s3_build/next-${{ github.sha }}/sdds-cs
- name: Plasma SDDS DFA Docs
run: |
npm run build --prefix="./website/sdds-dfa-docs"
cp -R ./website/sdds-dfa-docs/build ./s3_build/next-${{ github.sha }}/sdds-dfa
- name: Plasma SDDS INSOL Docs
run: |
npm run build --prefix="./website/sdds-insol-docs"
cp -R ./website/sdds-insol-docs/build ./s3_build/next-${{ github.sha }}/sdds-insol
- name: Plasma UI Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-ui"
cp -R ./packages/plasma-ui/build-sb ./s3_build_sb/ui-storybook
- name: Plasma Web Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-web"
cp -R ./packages/plasma-web/build-sb ./s3_build_sb/web-storybook
- name: Plasma B2C Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-b2c"
cp -R ./packages/plasma-b2c/build-sb ./s3_build_sb/b2c-storybook
- name: Plasma "ASDK" Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-asdk"
cp -R ./packages/plasma-asdk/build-sb ./s3_build_sb/asdk-storybook
- name: Plasma "New-hope" Storybook
run: |
npm run storybook:build --prefix="./packages/plasma-new-hope"
cp -R ./packages/plasma-new-hope/build-sb ./s3_build_sb/new-hope-storybook
- name: Plasma "SDDS SERV" Storybook
run: |
npm run storybook:build --prefix="./packages/sdds-serv"
cp -R ./packages/sdds-serv/build-sb ./s3_build_sb/sdds-serv-storybook
- name: Plasma "SDDS CS" Storybook
run: |
npm run storybook:build --prefix="./packages/sdds-cs"
cp -R ./packages/sdds-cs/build-sb ./s3_build_sb/sdds-cs-storybook
- name: Plasma "SDDS DFA" Storybook
run: |
npm run storybook:build --prefix="./packages/sdds-dfa"
cp -R ./packages/sdds-dfa/build-sb ./s3_build_sb/sdds-dfa-storybook
- name: Plasma "SDDS INSOL" Storybook
run: |
npm run storybook:build --prefix="./packages/sdds-insol"
cp -R ./packages/sdds-insol/build-sb ./s3_build_sb/sdds-insol-storybook
- name: Install s3cmd
run: pip3 install s3cmd
- name: Upload documentation build
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build/next-${{ github.sha }}/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/current/
- name: Upload to S3 storybook "Plasma-UI"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/ui-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/ui-storybook/
- name: Upload to S3 storybook "Plasma-Web"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/web-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/web-storybook/
- name: Upload to S3 storybook "Plasma-b2c"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/b2c-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/b2c-storybook/
- name: Upload to S3 storybook "Plasma-ASDK"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/asdk-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/asdk-storybook/
- name: Upload to S3 storybook "Plasma-New-Hope"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/new-hope-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/new-hope-storybook/
- name: Upload to S3 storybook "SDDS SERV"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/sdds-serv-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/sdds-serv-storybook/
- name: Upload to S3 storybook "SDDS INSOL"
run: >
s3cmd
--access_key ${{ secrets.AWS_ACCESS_KEY_ID }}
--secret_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
--host ${{ secrets.AWS_ENDPOINT }}
--host-bucket ${{ secrets.AWS_ENDPOINT }}
--bucket-location ${{ secrets.AWS_REGION }}
--signature-v2
--delete-removed
--no-mime-magic
sync
./s3_build_sb/sdds-insol-storybook/
s3://${{ secrets.AWS_S3_BUCKET_DEV_STAGE }}/sdds-insol-storybook/