diff --git a/tools/deploy-nightly.sh b/tools/deploy-nightly.sh
index 0bdf4f1b..80216958 100644
--- a/tools/deploy-nightly.sh
+++ b/tools/deploy-nightly.sh
@@ -3,7 +3,7 @@ PUBLICATION_BRANCH=master
# set -x
cd $HOME
# Checkout the branch
-git clone --branch=$PUBLICATION_BRANCH https://${GITHUB_TOKEN}@github.com/${REPO}.git publish
+git clone --branch=$PUBLICATION_BRANCH https://${GITHUB_TOKEN}@github.com/${ARTEFACT_REPO}.git publish
cd publish
# Update pages
cp $ARTEFACT_BASE/$BUILD_NAME.tar.xz .
@@ -25,7 +25,7 @@ for commit in $COMMITS; do
FILENAME=`find . -maxdepth 1 -name "*-$commit.tar.xz"`
if [ "$FILENAME" != "" ]; then
FN=${FILENAME:2}
- echo "$FN
" >> index.html
+ echo "$FN
" >> index.html
fi
done