add drone YML image

Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
Sam Therapy 2022-03-31 17:33:54 +02:00
parent 535a55dc9b
commit 2016c024e3
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

25
.drone.yml Normal file
View file

@ -0,0 +1,25 @@
kind: pipeline
type: docker
name: Build and Deploy
steps:
- name: Build
image: xdevbase/hugo-builder:latest
commands:
- hugo --destination /drone/src/build
- minify -r -o /drone/src/build /drone/src/build
- name: Deploy
image: xdevbase/hugo-builder:latest
commands:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | ssh-add -
- mkdir -p ~/.ssh
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- rsync -rv -e "ssh -p 22" /drone/src/build/ user@guide.thebub.club:/var/www/guide/ --checksum
environment:
SSH_KEY:
from_secret: drone_ssh_key
when:
event:
- push