diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 3f508447..1f668938 100755 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -12,9 +12,27 @@ SITEMAP_URL="https%3A%2F%2Fdocs.oceanprotocol.com%2Fsitemap.xml" set -e; function s3sync { - aws s3 sync ./public s3://"$1" --exclude "*.html" --exclude "*.xml" --cache-control max-age=31536000,public,immutable --delete --acl public-read --quiet + 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 - aws s3 sync ./public s3://"$1" --exclude "*" --include "*.html" --include "*.xml" --cache-control max-age=0,no-cache,no-store,must-revalidate --delete --acl public-read --quiet + aws s3 sync ./public s3://"$1" \ + --exclude "*" \ + --include "*.html" \ + --include "sw.js" \ + --cache-control public,max-age=0,must-revalidate \ + --delete \ + --acl public-read \ + --quiet } ##