From 42dc956558e1e63ffa38067744e4aba7456022ee Mon Sep 17 00:00:00 2001 From: Pierre-antoine Comby Date: Tue, 25 Jun 2019 22:00:02 +0200 Subject: [PATCH] switch to scp --- .gitlab-ci.yml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 86a7745..4fdbeed 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,11 +5,18 @@ deploy: variables: USER: "gitlab-runner" before_script: - - apt-get update -qy - - apt-get install -y lftp + - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )' + - eval $(ssh-agent -s) + - echo "$SSH_KEY" | tr -d '\r' | ssh-add - > /dev/null + - mkdir -p ~/.ssh + - chmod 700 ~/.ssh + - ssh-keyscan zamok.crans.org >> ~/.ssh/known_hosts + - chmod 644 ~/.ssh/known_hosts + script: - make all -j8 # build the pdf - - lftp -e "set ftp:ssl-allow false; set sftp:auto-confirm yes; mirror -R public www/m1-eea; bye" -u $FTP_USER,$FTP_PASSWORD sftp://zamok.crans.org + - scp -r public comby@zamok.crans.org:www/m1-eea + # - lftp -e "set ftp:ssl-allow false; set sftp:auto-confirm yes; mirror -R public www/m1-eea; bye" -u $FTP_USER,$FTP_PASSWORD sftp://zamok.crans.org only: - master # deploy the pdf only for commits made to the master branch