From a2639310b0e81d15313e1fb5ca1af4ed4d4745c4 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 25 Jul 2017 19:16:51 +0100 Subject: [PATCH] Try without cloning again --- publish.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/publish.sh b/publish.sh index d5a71efb..838081ab 100755 --- a/publish.sh +++ b/publish.sh @@ -6,11 +6,13 @@ SITE_ENV="prod" REPO=`git config remote.origin.url` SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:} SHA=`git rev-parse --verify HEAD` -BUILD_DIR="_deploy" +BUILD_DIR=".build" # Prepare the build directory. -git clone $REPO $BUILD_DIR +mkdir -p $BUILD_DIR pushd $BUILD_DIR +cp -R ../.git . +git fetch git checkout master || git checkout --orphan master popd rm -rf ${BUILD_DIR}/**/* || exit 0