File tree 3 files changed +23
-1
lines changed
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,5 @@ deploy:
35
35
detect_encoding : true
36
36
on :
37
37
branch : master
38
+ after_deploy :
39
+ - AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY python cloudfront_invalidate.py
Original file line number Diff line number Diff line change
1
+ import boto3
2
+
3
+ client = boto3 .client ('cloudfront' )
4
+
5
+ response = client .create_invalidation (
6
+ DistributionId = 'EL6HA8RZFI08I' ,
7
+ InvalidationBatch = {
8
+ 'Paths' : {
9
+ 'Quantity' : 1 ,
10
+ 'Items' : [
11
+ '/index.html' ,
12
+ ]
13
+ },
14
+ 'CallerReference' : 'string'
15
+ }
16
+ )
17
+ print (response )
Original file line number Diff line number Diff line change @@ -30,4 +30,7 @@ dev_environment:
30
30
conda env update
31
31
source activate pythonplot && pip install -r requirements.txt
32
32
33
- .PHONY : all render s3_upload run_nb travis clean invalidate_cache
33
+ cloudfront_invalidate :
34
+ python .travis/invalidate_cloudfront.py
35
+
36
+ .PHONY : all render s3_upload run_nb travis clean invalidate_cache cloudfront_invalidate
You can’t perform that action at this time.
0 commit comments