Skip to content

Instantly share code, notes, and snippets.

@rocknrollMarc
Created March 17, 2015 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocknrollMarc/80b4b8b51dee69b66299 to your computer and use it in GitHub Desktop.
Save rocknrollMarc/80b4b8b51dee69b66299 to your computer and use it in GitHub Desktop.
github-pages-deployscript
#!/bin/zsh
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
# Building 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:rocknrollmarc/mampaeyService.git
gh-pages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment