Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stages:
- - deploy
- before_script:
- - npm i
- - npm run build
- job_deploy:
- stage: deploy
- script:
- - ssh-keygen -t rsa -b 4096 -C '' -f ~/.ssh/deploy_rsa
- - ssh-keyscan -H 8.8.8.8 >> ~/.ssh/known_hosts
- - ssh-copy-id -i ~/.ssh/deploy_rsa.pub $SERVER_USER@8.8.8.8
- - rsync -avuz $CI_PROJECT_DIR/dist/ $SERVER_USER@8.8.8.8:/var/wwww/example.com
- only:
- - master
- /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
- /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
- Permission denied, please try again.
- Permission denied, please try again.
- Permission denied (publickey,password).
- rsync -avuz -e 'ssh -i ~/.ssh/deploy_rsa.pub' $CI_PROJECT_DIR/dist/ $SERVER_USER@8.8.8.8:/var/wwww/example.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement