File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ jobs:
122122 parameters :
123123 config :
124124 description : |
125- The config file you want to build the app using.
125+ The config file you want to build the app using.
126126 E.g. 'development' would load configurations from 'config/development.json'
127127 type : enum
128128 enum : ["development", "staging", "production"]
@@ -161,7 +161,7 @@ jobs:
161161 parameters :
162162 config :
163163 description : |
164- The config file you want to build the app using.
164+ The config file you want to build the app using.
165165 E.g. 'development' would load configurations from 'config/development.json'
166166 type : enum
167167 enum : ["development", "staging", "production"]
@@ -178,11 +178,17 @@ jobs:
178178 - attach_workspace :
179179 at : *workspace
180180 - run : # Required by aws-cli
181+ name : Set AWS region var
181182 command : echo 'export AWS_REGION=<< parameters.region >>' >> $BASH_ENV
182183 - aws-s3/sync :
183184 from : build_<< parameters.config >>
184185 overwrite : true
185186 to : ' s3://<< parameters.bucket >>'
187+ - run :
188+ name : Invalidate Cloudfront
189+ command : |
190+ export DIST_ID=$(aws cloudfront list-distributions --query "DistributionList.Items[?Aliases.Items[?contains(@, '<< parameters.bucket >>')]].Id | [0]" | tr -d '"')
191+ aws cloudfront create-invalidation --distribution-id ${DIST_ID} --paths "/*"
186192
187193workflows :
188194 version : 2
You can’t perform that action at this time.
0 commit comments