Compare commits
2 Commits
511542b03e
...
c9b97e0a60
Author | SHA1 | Date |
---|---|---|
kayomn | c9b97e0a60 | |
kayomn | 5b82332496 |
10
.drone.yml
10
.drone.yml
|
@ -10,6 +10,7 @@ steps:
|
|||
|
||||
- name: deploy
|
||||
image: alpine:latest
|
||||
|
||||
environment:
|
||||
HOST:
|
||||
from_secret: host
|
||||
|
@ -19,9 +20,18 @@ steps:
|
|||
from_secret: ssh_key
|
||||
SITE_PATH:
|
||||
from_secret: path
|
||||
|
||||
when:
|
||||
branch:
|
||||
- main
|
||||
|
||||
commands:
|
||||
- apk update
|
||||
- apk add openssh rsync
|
||||
- eval $(ssh-agent -s)
|
||||
- mkdir -p ~/.ssh
|
||||
- echo "$RSYNC_KEY" > ~/.ssh/id_rsa
|
||||
- chmod 600 ~/.ssh/id_rsa
|
||||
- ssh-add
|
||||
- echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||
- rsync -rP public/ "$${USER}@$${HOST}:$${SITE_PATH}"
|
||||
|
|
Loading…
Reference in New Issue