From 73d586f305d536e6c9957e82c2e02d3fa51d3b0e Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Wed, 9 Aug 2017 22:05:29 +0200 Subject: [PATCH] diff: actually fix publish.sh script --- docs/.gitignore | 2 +- docs/publish.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/.gitignore b/docs/.gitignore index a48cf0d..434306b 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1 +1 @@ -public +public_git diff --git a/docs/publish.sh b/docs/publish.sh index 1df3f15..b176ff3 100755 --- a/docs/publish.sh +++ b/docs/publish.sh @@ -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