Add build script
This commit is contained in:
25
build.sh
Executable file
25
build.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#! /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
|
||||
Reference in New Issue
Block a user