-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy.sh
executable file
·35 lines (31 loc) · 878 Bytes
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /usr/bin/env bash
# cache busted js assets
aws s3 sync public s3://richardnias.com \
--region eu-west-2 \
--exclude "*" \
--include "*.js" \
--include "*.js.map" \
--exclude "service-worker.js" \
--cache-control "max-age=2628000, immutable" \
--content-encoding "gzip"
# service-worker.js
aws s3 sync public s3://richardnias.com \
--region eu-west-2 \
--exclude "*" \
--include "service-worker.js" \
--cache-control "max-age=0" \
--content-encoding "gzip"
# html
aws s3 sync public s3://richardnias.com \
--region eu-west-2 \
--exclude "*" \
--include "*.html" \
--cache-control "max-age=3600" \
--content-encoding "gzip"
# the rest
aws s3 sync public s3://richardnias.com \
--region eu-west-2 \
--include "*" \
--exclude "*.js" \
--exclude "*.html" \
--cache-control "max-age=3600"