From 0016f79ef428e3f4b52cf20c4cac3b979c414a33 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 19 Aug 2023 19:37:37 +0100 Subject: [PATCH] Attempt to fix CI --- .drone.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1543944..4682f06 100644 --- a/.drone.yml +++ b/.drone.yml @@ -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}"