add drone YML image
Signed-off-by: Sam Therapy <sam@samtherapy.net>
This commit is contained in:
parent
535a55dc9b
commit
2016c024e3
1 changed files with 25 additions and 0 deletions
25
.drone.yml
Normal file
25
.drone.yml
Normal 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
|
Loading…
Reference in a new issue