@@ -6,7 +6,7 @@ parameters:
6
6
default : " "
7
7
8
8
orbs :
9
- aws-cli : circleci/aws-cli@5.3.5
9
+ aws-cli : circleci/aws-cli@5.4.1
10
10
11
11
12
12
executors :
@@ -109,7 +109,6 @@ jobs:
109
109
- notify_error :
110
110
message : " Build job failed for branch ${CIRCLE_BRANCH}"
111
111
112
-
113
112
validate :
114
113
executor : ruby_executor
115
114
steps :
@@ -130,7 +129,6 @@ jobs:
130
129
- notify_error :
131
130
message : " Validation job failed for branch ${CIRCLE_BRANCH}"
132
131
133
-
134
132
deploy-preview :
135
133
executor : node_executor
136
134
steps :
@@ -185,19 +183,34 @@ jobs:
185
183
- notify_error :
186
184
message : " Deploy preview job failed for branch ${CIRCLE_BRANCH}"
187
185
188
-
189
186
deploy-production :
190
187
executor : node_executor
188
+ parameters :
189
+ bucket_dir :
190
+ default : " dorian"
191
+ description : The directory in the bucket to deploy to.
192
+ type : string
193
+ bucket_name :
194
+ description : The name of the s3 bucket where static assets are stored.
195
+ type : string
196
+ build_dir :
197
+ default : " build"
198
+ description : The path to the docs build directory
199
+ type : string
191
200
steps :
192
201
- attach_workspace :
193
202
at : .
194
203
- aws-setup
195
204
- run :
196
205
name : Deploy Production Site to S3
197
206
command : |
207
+ AWS_S3_BUCKET=<< parameters.bucket_name >>
208
+ BUCKET_DIRECTORY=<< parameters.bucket_dir >>
209
+ BUILD_DIRECTORY=<< parameters.build_dir >>
210
+
198
211
set -e
199
212
echo "[INFO] Deploying production site..."
200
- aws s3 sync build s3://${DOCS_BUILD_BUCKET}/ --delete --endpoint-url ${S3_ENDPOINT}
213
+ aws s3 cp "$BUILD_DIRECTORY" " s3://$AWS_S3_BUCKET/$BUCKET_DIRECTORY/" --recursive
201
214
- notify_error :
202
215
message : " Production deployment job failed for branch ${CIRCLE_BRANCH}"
203
216
@@ -242,12 +255,10 @@ jobs:
242
255
echo "[WARN] Tag '${TAG}' not found."
243
256
fi
244
257
245
-
246
258
workflows :
247
-
248
259
lint :
249
260
unless :
250
- equal : [ main, << pipeline.git.branch >> ]
261
+ equal : [main, << pipeline.git.branch >>]
251
262
jobs :
252
263
- vale/lint :
253
264
reference_branch : main
@@ -272,6 +283,9 @@ workflows:
272
283
branches :
273
284
only : main
274
285
context : circleci-docs-static
286
+ bucket_dir : " dorian"
287
+ bucket_name : " circleci-docs-platform-assets/docs"
288
+ build_dir : " build"
275
289
cleanup_preview :
276
290
when : pipeline.parameters.cleanup_preview_branch != ""
277
291
jobs :
0 commit comments