Created
February 11, 2017 10:02
-
-
Save hemc4/c79d163579c9931b6dafb90c92ed1d27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
DISTRIBUTION_ID=E6VHHP64I3KLD | |
BUCKET_NAME=hemc.io-cdn | |
# Copy over pages - not static js/img/css/downloads | |
aws s3 sync --acl "public-read" --sse "AES256" public/ s3://$BUCKET_NAME --exclude 'post' | |
# Invalidate root page and page listings | |
aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths /index.html / /post/* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment