devroom.io/deploy.sh

21 lines
508 B
Bash
Raw Normal View History

2015-03-26 12:48:12 +00:00
#!/bin/bash
source=public/
target=apps@spock.ariejan.net:/home/apps/sites/ariejan.net
if [ ! `git symbolic-ref HEAD | grep -q "refs/heads/master"` ] ; then
echo "You are not on the 'master' branch. Not deploying."
exit
fi
2015-03-26 12:48:12 +00:00
if [ -d ./public ] ; then
echo "-- Pruning current static files from ./${source}"
rm -rf ./${source}
fi
echo "-- Generating website to ./${source}"
hugo
echo "-- Uploading using rsync to ${target}"
rsync -aqz --delete-after --no-progress ${source} -e ssh ${target}