1
0
mirror of https://github.com/balkian/balkian.github.com.git synced 2024-09-21 08:01:42 +00:00
balkian.github.com/deploy.sh
J. Fernando Sánchez 7c3fb50312 Move to Hugo
2019-01-10 20:26:53 +01:00

28 lines
424 B
Bash
Executable File

#!/bin/bash
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
# 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 [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"
# Push source and build repos.
git push origin master
# Come Back up to the Project Root
cd ..