mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-06 00:33:39 +00:00
25 lines
372 B
Bash
Executable File
25 lines
372 B
Bash
Executable File
#!/bin/bash
|
|
|
|
echo -e "\033[0;32mDeploying updates to GitHub...\033[0m"
|
|
|
|
# Build the project.
|
|
hugo -t xmin
|
|
|
|
# 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 ..
|