Attempt to fix CI

This commit is contained in:
kayomn 2023-08-19 19:37:37 +01:00
parent f85e031deb
commit 0016f79ef4
1 changed files with 25 additions and 10 deletions

View File

@ -8,14 +8,29 @@ steps:
command: ["build"] command: ["build"]
- name: deploy - name: deploy
image: drillster/drone-rsync image: alpine
settings:
hosts: ["pizzawednes.day"]
user: site
source: public/*
target: /var/site/
recursive: true
delete: true
environment: environment:
RSYNC_KEY: HOST:
from_secret: rsync_key from_secret: host
USER:
from_secret: user
SSH_KEY:
from_secret: ssh_key
PATH:
from_secret: path
when:
branch:
- main
commands:
sudo apk update
sudo apk add 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}:$${PATH}"