This commit is contained in:
parent
257decff6e
commit
93bbaa2b91
1 changed files with 3 additions and 6 deletions
|
@ -10,13 +10,10 @@ steps:
|
|||
image: debian:12
|
||||
commands:
|
||||
- apt update -y && apt install -y rsync openssh-client
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$KEY" > ~/.ssh/id_ed25519
|
||||
- rsync --archive --verbose --compress --hard-links --delete-during --partial --progress ./.output/ root@gorb.app:/var/www/gorb.app
|
||||
- ssh root@gorb.app systemctl restart gorb.app.service
|
||||
- ssh-agent bash -c "ssh-add <(echo '$MY_SSH_KEY') && rsync --archive --verbose --compress --hard-links --delete-during --partial --progress ./.output/ root@gorb.app:/var/www/gorb.app && ssh root@gorb.app systemctl restart gorb.app.service"
|
||||
environment:
|
||||
KEY:
|
||||
from_secret: ssh_key
|
||||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
- branch: main
|
||||
event: push
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue