forked from florianbuerger/awesome-sket.ch
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy.sh
More file actions
19 lines (14 loc) · 715 Bytes
/
deploy.sh
File metadata and controls
19 lines (14 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#! /bin/sh
BUCKET_NAME="awesome-sket.ch"
grunt build
find dist/ -iname '*.html' -exec gzip -n --best {} +
find dist/ -iname '*.xml' -exec gzip -n --best {} +
find dist/assets/css -iname '*.css' -exec gzip -n --best {} +
for f in `find dist/ -iname '*.gz'`; do
mv $f ${f%.gz}
done
# sync HTML/XML and images
s3cmd sync --progress -M --acl-public --add-header 'Content-Encoding:gzip' dist/ s3://${BUCKET_NAME}/ --exclude '*.*' --include '*.html' --include '*.xml' --include '*.css' --verbose
s3cmd sync --progress -M --acl-public dist/assets/img/ s3://${BUCKET_NAME}/assets/img/ --exclude '*.*' --include '*.png' --include '*.gif' --include '*.jpg' --verbose
# Clean up since all pages are gzipped
grunt clean