drone: add CI/CD
This commit is contained in:
parent
8a55160bd5
commit
02d1354e4c
40
.drone.yml
Normal file
40
.drone.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
kind: pipeline
|
||||
name: default
|
||||
|
||||
clone:
|
||||
disable: true
|
||||
|
||||
|
||||
steps:
|
||||
- name: clone
|
||||
image: plugins/git
|
||||
recursive: true
|
||||
|
||||
- name: build
|
||||
image: klakegg/hugo
|
||||
commands:
|
||||
- hugo version
|
||||
- hugo --destination /drone/src/build --minify
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
source: /drone/src/build/*
|
||||
strip_components: 3 # Make sure the tarball doesn't contain leading path
|
||||
rm: true # Make sure only the newly generated files are left
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
target:
|
||||
from_secret: ssh_target
|
||||
username:
|
||||
from_secret: ssh_user
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
Loading…
Reference in a new issue