From 1a96f6ec97bf70aae374a709abe419679f019456 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 10 Jul 2017 23:12:20 +0100 Subject: [PATCH] Add build.sh --- build.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 build.sh diff --git a/build.sh b/build.sh new file mode 100755 index 00000000..e6f9d68a --- /dev/null +++ b/build.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +SITE_ENV="test" + +# Remove the existing docs directory, build the site and create the new +# docs directory. +rm -rf ./docs +vendor/bin/sculpin generate --no-interaction --clean --env=${SITE_ENV} +touch output_${SITE_ENV}/.nojekyll +mv output_${SITE_ENV} docs + +# Ensure the correct Git variables are used. +git config --local user.name 'Oliver Davies' +git config --local user.email oliver@oliverdavies.uk + +# Add, commit and push the changes. +git add --all docs +git commit -m 'Build.' +git push origin HEAD