Skip to content

Instantly share code, notes, and snippets.



Created Apr 1, 2020
What would you like to do?
A deploy script to push your changes to github.
In the name of Allah, the most Gracious, the most Merciful.
░▓ Author ▓ Abdullah <>
# If a command fails then the deploy stops
set -e
printf "\033[0;32mDeploying updates to GitHub...\033[0m\n"
# Build the project.
hugo # if using a theme, replace with `hugo -t <YOURTHEME>`
# Go To Public folder
cd public
# Add changes to git.
git add .
# Commit changes.
msg="rebuilding site $(date)"
if [ -n "$*" ]; then
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
You can’t perform that action at this time.