diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc66bdf..a21c74c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,4 +17,10 @@ build: deploy: stage: deploy script: - - ls out \ No newline at end of file + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add - > /dev/null + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + + - ssh "$SERVER_HOST" ls \ No newline at end of file