diff: actually fix publish.sh script

This commit is contained in:
Christian Schwarz 2017-08-09 22:05:29 +02:00
parent 9e9f464de7
commit 73d586f305
2 changed files with 5 additions and 5 deletions

2
docs/.gitignore vendored
View File

@ -1 +1 @@
public
public_git

View File

@ -3,7 +3,7 @@ set -eo pipefail
GHPAGESREPO="git@github.com:zrepl/zrepl.github.io.git"
SCRIPTDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
PUBLICDIR="${SCRIPTDIR}/public"
PUBLICDIR="${SCRIPTDIR}/public_git" #use different dir than default dir 'public' (hugo server -D)
checkout_repo_msg() {
echo "checkout ${GHPAGESREPO} to ${PUBLICDIR}:"
@ -39,17 +39,17 @@ git fetch origin
git reset --hard origin/master
echo "cleaning GitHub pages repo"
git clean -dn
git rm -rf .
popd
echo "building site"
hugo
hugo -d "$PUBLICDIR"
pushd "$PUBLICDIR"
echo "adding and commiting all changes in GitHub pages repo"
git add -A
git commit -m "hugo render from publish.sh - `date -u`"
git commit -m "hugo render from publish.sh - `date -u`" #TODO include parent commit id
git push origin master