From 81a96fbf349e116b7b639a494087b390b6f6b00f Mon Sep 17 00:00:00 2001 From: Stu Sherwin Date: Tue, 21 Aug 2018 18:33:22 +0100 Subject: [PATCH] Run ssh-agent --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5a1c14f..19f25a2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,9 +9,11 @@ deploy: - apt-get update -y - apt-get -y install rsync - gem install jekyll + - eval $(ssh-agent -s) script: - jekyll build -d public - - rsync -avz --delete --no-group -e 'ssh -o StrictHostKeyChecking=no' ./dist/ $SERVER_USER@autonomic.zone:/var/www/autonomic.zone/html/ + - ssh-add <(echo "$SSH_PRIVATE_KEY") + - rsync -avz --delete --no-group -e 'ssh -o StrictHostKeyChecking=no' ./dist/ "$SERVER_USER"@autonomic.zone:/var/www/autonomic.zone/html/ artifacts: paths: - public