]> git.wincent.com - hextrapolate.git/blob - deploy.sh
Add high-tech deployment script
[hextrapolate.git] / deploy.sh
1 #!/bin/sh
2
3 set -e
4
5 declare -r HOST=hex.wincent.com
6 declare -r BASE=/var/www/hex.wincent.com/public_html
7
8 # Upload files to staging area.
9 ssh $HOST mkdir -p hextrapolate/dist
10 scp index.html $HOST:hextrapolate
11 scp dist/bundle.js dist/bundle.js.map $HOST:hextrapolate/dist/
12
13 # Move files into final position.
14 ssh -t $HOST sudo mkdir -p $BASE/dist
15 ssh -t $HOST sudo cp hextrapolate/index.html $BASE/
16 ssh -t $HOST sudo cp hextrapolate/dist/bundle.js hextrapolate/dist/bundle.js.map $BASE/dist/