From 9c50f160434386f8d7ac11d780aef8fd64bf70dc Mon Sep 17 00:00:00 2001 From: Andrei Stoica Date: Wed, 3 May 2017 12:56:01 -0400 Subject: [PATCH] added deploy script --- deploy.sh | 24 ++++++++++++++++++++++++ public | 1 + 2 files changed, 25 insertions(+) create mode 100755 deploy.sh create mode 160000 public diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..755bb16 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +echo -e "\033[0;32mDeploying updates to GitHub...\033[0m" + +# Build the project. +hugo -t light-hugo # if using a theme, replace by `hugo -t ` + +# Go To Public folder +cd public +# Add changes to git. +git add -A + +# Commit changes. +msg="rebuilding site `date`" +if [ $# -eq 1 ] + then msg="$1" + fi + git commit -m "$msg" + +# Push source and build repos. +git push origin master + +# Come Back +cd .. diff --git a/public b/public new file mode 160000 index 0000000..810d200 --- /dev/null +++ b/public @@ -0,0 +1 @@ +Subproject commit 810d2009c5b61c1fbd1a22a86d4aba8e57f82548