From e5707f59bcbc9392458724b095393f04feab0b70 Mon Sep 17 00:00:00 2001 From: Ariejan de Vroom Date: Thu, 26 Mar 2015 13:48:12 +0100 Subject: [PATCH] Add deploy shell script --- deploy.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..b2adc3d --- /dev/null +++ b/deploy.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +source=public/ +target=apps@spock.ariejan.net:/home/apps/sites/ariejan.net + +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}