Skip to content

Commit f3dc0e5

Browse files
committed
reset cache after deploy
1 parent fc0d76e commit f3dc0e5

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,5 @@ deploy:
3535
detect_encoding: true
3636
on:
3737
branch: master
38+
after_deploy:
39+
- AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY AWS_SECRET_ACCESS_KEY=$AWS_SECRET_KEY ./.travis/reset_cloudfront_cache.sh

.travis/reset_cloudfront_cache.sh

100644100755
Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###############################################################################
22
### Resets CloudFront cache with boto/cfadmin utility
3-
### Run: ./this_script
3+
### Run: ./reset_cloudfront_cache.sh
44
###############################################################################
55

66
#
@@ -20,32 +20,9 @@ else
2020
exit 0
2121
fi
2222

23-
#
24-
# Install boto
25-
#
26-
echo -e "\nInstalling boto...\n"
27-
git clone git://github.com/boto/boto.git
28-
cd boto
29-
sudo python setup.py install
30-
cd ../
31-
rm -rf boto
32-
33-
#
34-
# Set up credentials for boto
35-
#
36-
echo -e "\nSet up boto credentials...\n"
37-
cat > ~/.boto <
38-
# XNXNXXNNNNXNXN - distribution configured for the Web - in aws amazon cloudfront distributions.
39-
#
4023
echo -e "\nCloudFront Invalidating...\n"
4124
cfadmin invalidate XNXNXXNNNNXNXN /yoursite.com
4225
cfadmin invalidate XNXNXXNNNNXNXN /.yoursite.com
4326
cfadmin invalidate XNXNXXNNNNXNXN /index.html /static/main.css /static/main.js
4427
echo -e "\nInvalidating is in progress...\n"
4528
echo -e "\nYou can check the status on the 'Invalidations' tab here https://console.aws.amazon.com/cloudfront/home?region=your_region#distribution-settings:XNXNXXNNNNXNXN\n"
46-
47-
#
48-
# Clean up
49-
#
50-
echo -e "\nRemove boto config file\n"
51-
rm ~/.boto

0 commit comments

Comments
 (0)