Skip to content

Commit ab1d449

Browse files
committed
try another fancy invalidate
1 parent 667ab3d commit ab1d449

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ deploy:
3636
on:
3737
branch: master
3838
after_deploy:
39-
- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY ./.travis/reset_cloudfront_cache.sh
39+
- make invalidate_cache

.travis/cloudfront_invalidate.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env python3
2+
from boto.cloudfront import CloudFrontConnection
3+
4+
aws_cf_distribution_id = 'EL6HA8RZFI08I'
5+
6+
objects = ['/index.html']
7+
conn = CloudFrontConnection()
8+
print(conn.create_invalidation_request(aws_cf_distribution_id, objects))

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ s3_upload:
2626
run_nb:
2727
jupyter nbconvert --to notebook --execute "Examples.ipynb" --output "Examples.$(GIT_COMMIT).ipynb"
2828

29-
.PHONY: all render s3_upload run_nb travis clean
29+
invalidate_cache:
30+
AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY python ./.travis/cloudfront_invalidate.py
31+
32+
.PHONY: all render s3_upload run_nb travis clean invalidate_cache

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jinja2
88
jinja2-highlight
99
markdown
1010
scikit-misc
11-
boto
11+
boto3

0 commit comments

Comments
 (0)