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"]
- name: deploy
image: drillster/drone-rsync
settings:
hosts: ["pizzawednes.day"]
user: site
source: public/*
target: /var/site/
recursive: true
delete: true
image: alpine
environment:
RSYNC_KEY:
from_secret: rsync_key
HOST:
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}"