Blog_IMIE/.gitlab-ci.yml
2018-11-17 21:29:33 +01:00

27 lines
555 B
YAML

image: dblaci/ubuntu-ssh-rsync
before_script:
#- 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-keyscan 35.180.10.123 >> ~/.ssh/known_hosts
deploy_to_webserver:
stage: deploy
only:
- master
script:
#- rsync -rpv --exclude='project/.htaccess' project/* $USER_WEBSERVER@$IP_WEBSERVER:/var/www/html
- echo $HOME
- ls -l /root
- pwd
- ls -l
when: manual