From 9a045b4608b87d85f3ace567042991dab7b85828 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 26 Oct 2018 11:08:22 +0200 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f484d88..a73b1f95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,12 @@ image: alpine:latest pages: stage: deploy script: + - mkdir "${HOME}/.ssh" + - chmod 700 "${HOME}/.ssh" + # The following is stupid but required for some reason + - mkdir .public + - cp -r * .public + - mv .public public - if [ ! -z ${DEPLOYEMENT_KNOWN_HOSTS+x} ]; then echo -e "${DEPLOYEMENT_KNOWN_HOSTS}" > ${HOME}/.ssh/known_hosts; fi - eval `ssh-agent -s` - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}" | base64 --decode -i); fi