Files
hugo-cwpearson/build.sh
2017-03-27 14:59:04 -05:00

25 lines
406 B
Bash
Executable File

#! /bin/bash
## Try to find cwpearson.github.io
paths=`find $HOME -name cwpearson.github.io`
numpaths=`echo "$paths" | wc -l`
if [[ "$numpaths" -ne "1" ]]; then
echo "Found more than one cwpearson.github.io"
exit -1
fi
# Clean up repo
cd $paths
git rm -r *
# Build website
cd -
hugo -d $paths
# push new content
cd $paths
git add *
git commit -m "[build.sh] Deployed from hugo-cwpearson"
git push