devroom.io/deploy.sh

25 lines
653 B
Bash
Raw Normal View History

2015-03-26 12:48:12 +00:00
#!/bin/bash
source=public/
2015-12-03 13:48:54 +00:00
target=ariejan@mail.devroom.io:/home/ariejan/www/ariejan.net
2015-04-08 07:29:26 +00:00
git symbolic-ref HEAD | grep -q "refs/heads/master"
if [ $? != 0 ] ; then
echo "You are not on the 'master' branch. Not deploying."
2015-04-08 07:29:26 +00:00
exit 1
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}"
2015-12-03 13:48:54 +00:00
hugo
2015-03-26 12:48:12 +00:00
2016-01-13 12:14:48 +00:00
echo "-- Compressing CSS"
yuicompressor themes/outerspaces/static/css/outerspace.css -o themes/outerspace/static/css/outerspace-min.css
2015-03-26 12:48:12 +00:00
echo "-- Uploading using rsync to ${target}"
rsync -aqz --delete-after --no-progress ${source} -e ssh ${target}