Skip to content

Commit

Permalink
Add a deployment script that supports signed pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tasn committed Dec 29, 2017
1 parent c1780ce commit 2de13c9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions deploy.sh
@@ -0,0 +1,12 @@
SSH_HOST=client.etesync.com
SSH_PORT=22
SSH_USER=etesync
SSH_TARGET_DIR=sites/client.etesync.com

OUTPUTDIR=./build

yarn build

sed -i "s#\(<script type=\"text/javascript\"\)#\1 integrity=\"sha384-$(shasum -b -a 384 build/static/js/main.*.js | xxd -r -p | base64 -w0)\" crossorigin=\"anonymous\"#" build/index.html
./page-signer.js build/index.html build/index.html
rsync -e "ssh -p ${SSH_PORT}" -P --delete -rvzc --exclude '*.map' ${OUTPUTDIR}/ ${SSH_USER}@${SSH_HOST}:${SSH_TARGET_DIR}

0 comments on commit 2de13c9

Please sign in to comment.