Created
March 12, 2020 02:58
-
-
Save rsurjano/cd34fc48e792b096b084c882f55ab631 to your computer and use it in GitHub Desktop.
S3 uploading
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
# PURGING S3 BUCKET | |
aws s3 rm s3://llamabus.pe --recursive | |
#UPLOADING TO S3 | |
aws s3 sync ./packages/llamabus-front/public/ s3://llamabus.pe \ | |
--exclude "*" \ | |
--include "*.js" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \ | |
--include "*.html" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \ | |
--include "*.css" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \ | |
--include "*.svg" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip \ | |
--include "*.json" --acl "public-read" --cache-control "max-age=31536000" --content-encoding gzip | |
# UPLOADING EVERYTHING ELSE | |
aws s3 sync ./packages/llamabus-front/public/ s3://llamabus.pe \ | |
--include "*" --acl "public-read" \ | |
--exclude "*.js" \ | |
--exclude "*.html" \ | |
--exclude "*.css" \ | |
--exclude "*.svg" \ | |
--exclude "*.json" | |
# INVALIDATING CLOUDFRONT | |
aws cloudfront create-invalidation --distribution-id E2XA0EWAIGSGOP --paths "/*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment