You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
blog/.drone.yml

33 lines
632 B

---
kind: pipeline
type: docker
name: default
trigger:
branch:
- master
steps:
- name: Build
image: golang:alpine
commands:
- apk add hugo git minify
- hugo
- minify -r -o public/ public/
- name: Upload
image: jguyomard/hugo-builder
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" public/ $SSH_USER@$SSH_HOST:root --checksum
environment:
SSH_KEY:
from_secret: SSH_KEY
SSH_USER:
from_secret: SSH_USER
SSH_HOST:
from_secret: SSH_HOST