drone ci rsync test
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
oDinZu 2022-05-10 00:01:02 -04:00
parent b39dac5fc9
commit 2ecf0eb66c

View File

@ -72,7 +72,7 @@ steps:
# write the ssh key to disk for rsync handshake to remote server
- ssh-keygen -t ed25519 -f ~/.ssh/id_rsa -N ''
- cat ~/.ssh/id_rsa.pub
- ssh-copy-id -i ~/.ssh/id_rsa.pub $SSH_USER@$SSH_HOST
- ssh-copy-id -i ~/.ssh/id_rsa.pub odinzu@45.33.119.101
#- mkdir -p ~/.ssh/
#- touch ~/.ssh/id_rsa
#- touch ~/.ssh/id_rsa.pub
@ -80,17 +80,12 @@ steps:
#- echo -nv $RSA_PUB_KEY > ~/.ssh/id_rsa.pub
#- cp /root/.ssh/id_rsa.pub ~/.ssh/authorized_keys
- chmod 600 ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa.pub
- eval `ssh-agent -s`
#- ssh-add /root/.ssh/id_rsa
- ls -al /root/.ssh/
# add git.sharpetronics.com to known hosts
- touch /root/.ssh/known_hosts
- chmod 600 /root/.ssh/known_hosts
#- ssh-keyscan -H git.sharpetronics.com > /etc/ssh/ssh_known_hosts 2> /dev/null
# sync files to remote server [local _site ] to [remote _site www]
- rsync -aXvPzr ../_site --rsh="ssh -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no" $SSH_USER@$SSH_HOST:/var/www/demo.sharpetronics.com/
- rsync -aXvPzr ../_site --rsh="ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no" $SSH_USER@$SSH_HOST:/var/www/demo.sharpetronics.com/
# create tar.gz of _site directory for download elsewhere
- tar -czf ../www-data.tar.gz ../_site/*