@@ -147,12 +147,17 @@ jobs:
147
147
name : Enable CloudFront
148
148
command : aws configure set preview.cloudfront true
149
149
- run :
150
- name : Upload to S3
150
+ name : Upload to S3 with all cached
151
151
command : aws s3 sync ./build s3://${S3_BUCKET_NAME} --delete --cache-control max-age=31536000,public
152
-
153
152
- run :
154
- name : Update file cache headers
153
+ name : Update file cache headers to remove caching - index.html
155
154
command : aws s3 cp s3://${S3_BUCKET_NAME}/index.html s3://${S3_BUCKET_NAME}/index.html --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
155
+ - run :
156
+ name : Update file cache headers to remove caching - sw.js
157
+ command : aws s3 cp s3://${S3_BUCKET_NAME}/sw.js s3://${S3_BUCKET_NAME}/sw.js --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
158
+ - run :
159
+ name : Update file cache headers to remove caching - sw.js.gz
160
+ command : aws s3 cp s3://${S3_BUCKET_NAME}/sw.js.gz s3://${S3_BUCKET_NAME}/sw.js.gz --metadata-directive REPLACE --cache-control max-age=0,no-cache,no-store,must-revalidate --content-type text/html --acl public-read
156
161
- run :
157
162
name : Invalidate CloudFront distribution
158
163
command : aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths "/index.html"
@@ -176,7 +181,6 @@ jobs:
176
181
name : Notify via Slack
177
182
command : curl -X POST -H 'Content-type:\ application/json' --data "{'text':'🍰 Deploy successful.'}" $SLACK_HOOK
178
183
179
-
180
184
notify-sentry-deploy :
181
185
executor : docker-executor
182
186
steps :
@@ -196,7 +200,6 @@ jobs:
196
200
name : Notify via Slack
197
201
command : curl -X POST -H 'Content-type:\ application/json' --data "{'text':'🦾 Sentry Release successful.'}" $SLACK_HOOK
198
202
199
-
200
203
workflows :
201
204
version : 2
202
205
build_and_test :
0 commit comments