@@ -24,7 +24,10 @@ steps:
|
|||||||
image: alpine:latest
|
image: alpine:latest
|
||||||
commands:
|
commands:
|
||||||
- apk add --no-cache openssh rsync
|
- apk add --no-cache openssh rsync
|
||||||
- rsync -e "ssh -i /ssh/deploy_key" -avz --delete dist/ root@192.168.1.88:/srv/shop/
|
- mkdir -p /ssh
|
||||||
- ssh -i /ssh/deploy_key root@192.168.1.88 'systemctl restart shop-server'
|
- echo "$$*** > /ssh/deploy_key
|
||||||
|
- chmod 600 /ssh/deploy_key
|
||||||
|
- ssh-keyscan -H 192.168.1.88 >> /etc/ssh/ssh_known_hosts 2>/dev/null
|
||||||
|
- rsync -e "ssh -i /ssh/deploy_key -o StrictHostKeyChecking=no" -avz --delete client/dist/ root@192.168.1.88:/var/www/
|
||||||
secrets: [deploy_key]
|
secrets: [deploy_key]
|
||||||
depends_on: [lint, build]
|
depends_on: [lint, build]
|
||||||
|
|||||||
Reference in New Issue
Block a user