encompass-cs-docs/deploy.sh

39 lines
598 B
Bash
Raw Normal View History

2019-05-22 00:54:20 +00:00
#!/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 ..
2019-05-22 01:25:11 +00:00
# Commit submodule change.
2019-05-22 01:51:52 +00:00
git add public
2019-05-22 01:25:11 +00:00
msg="updating submodule"
if [ $# -eq 1 ]
then msg="$1"
fi
git commit -m "$msg"
# Push repo.
git push origin master
echo -e "Done."