mirror of
https://github.com/Aviortheking/Blog_IMIE.git
synced 2025-05-18 07:09:55 +00:00
27 lines
555 B
YAML
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
|
|
|