diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1255595..b07fc88 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,6 +38,12 @@ deploy-period: stage: deploy environment: production image: debian:buster + before_script: + - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh script: - ssh ahosking@192.168.1.19 "cd /home/ahosking/period && git pull origin master && exit" only: