Skip to content

Instantly share code, notes, and snippets.

@yetti
Created September 20, 2016 13:56
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 yetti/347c64281de97d329a4e52e5e3b1402d to your computer and use it in GitHub Desktop.
Save yetti/347c64281de97d329a4e52e5e3b1402d to your computer and use it in GitHub Desktop.
Deploys Hugo site to Github master branch
#!/bin/bash
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
# Add changes to git.
git add -A
# Commit changes.
msg="deploying updates `date`"
if [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"
# Push source and build repos.
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment