From 1e536495af41afb25383076b22f31e01bca12f8a Mon Sep 17 00:00:00 2001 From: Spencer Lyon Date: Sat, 29 Mar 2014 12:15:37 -0400 Subject: [PATCH] ENH: added deploy.sh script --- deploy.sh | 20 ++++++++++++++++++++ public/README.md | 4 ---- 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 deploy.sh delete mode 100644 public/README.md diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..39912ab --- /dev/null +++ b/deploy.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +echo -e "\033[0;32mDeploying updates to Github...\033[0m" + +# Build the project. +hugo + +# 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 +git subtree push --prefix=public git@github.com:spencerlyon2/hugo_gh_blog.git gh-pages diff --git a/public/README.md b/public/README.md deleted file mode 100644 index 0d15a13..0000000 --- a/public/README.md +++ /dev/null @@ -1,4 +0,0 @@ -hugo_gh_blog -============ - -Template repo for a blog built with Hugo deployed on github-pages