From e3644ea447b7ef3e64ff95dba767ff6e0dc2e0bb Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Mon, 10 Dec 2018 13:20:20 +0100 Subject: [PATCH] tweak deployment * cache everything by default * modify cache headers for selected files afterwards --- scripts/deploy.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/scripts/deploy.sh b/scripts/deploy.sh index e67584fa..54cdd674 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -13,26 +13,21 @@ set -e; function s3sync { aws s3 sync ./public s3://"$1" \ - --exclude "*" \ - --include "*.js" \ - --include "*.css" \ - --include "static/*" \ - --include "icons/*" \ - --exclude "sw.js" \ - --exclude "workbox*/*" \ --cache-control public,max-age=31536000,immutable \ --delete \ - --acl public-read \ - --quiet + --acl public-read aws s3 sync ./public s3://"$1" \ --exclude "*" \ --include "*.html" \ --include "sw.js" \ + --include "chunk-map.json" \ + --include "sitemap.xml" \ + --include ".iconstats.json" \ + --include "robots.txt" \ --cache-control public,max-age=0,must-revalidate \ --delete \ - --acl public-read \ - --quiet + --acl public-read } ##