new drone integration
This commit is contained in:
parent
f45fa97f51
commit
2bbdbaece5
61
.drone.yml
61
.drone.yml
@ -1,32 +1,39 @@
|
|||||||
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
trigger:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: Version check
|
||||||
image: plugins/hugo
|
image: paramah/hugo-deploy
|
||||||
settings:
|
commands:
|
||||||
pull: always
|
- echo ">>> HUGO version check"
|
||||||
url:
|
- hugo version
|
||||||
from_secret: domain
|
|
||||||
validate: true
|
|
||||||
|
|
||||||
- name: deploy
|
- name: Build
|
||||||
image: appleboy/drone-scp
|
image: paramah/hugo-deploy
|
||||||
settings:
|
commands:
|
||||||
host:
|
- npm install -D --save autoprefixer
|
||||||
from_secret: ssh_host
|
- npm install -D --save postcss-cli
|
||||||
target:
|
- git submodule update --init --recursive
|
||||||
from_secret: site_path
|
- hugo --destination /drone/src/build
|
||||||
source: public/*
|
- minify -r -o /drone/src/build /drone/src/build
|
||||||
username:
|
|
||||||
from_secret: ssh_username
|
- name: Upload
|
||||||
password:
|
image: paramah/hugo-deploy
|
||||||
from_secret: ssh_password
|
commands:
|
||||||
port:
|
- eval `ssh-agent -s`
|
||||||
from_secret: ssh_port
|
- echo "$SSH_KEY" | ssh-add -
|
||||||
when:
|
- mkdir -p ~/.ssh
|
||||||
branch:
|
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
|
||||||
- master
|
- rsync -rv -e "ssh -p 65522" /drone/src/build/ $SSH_URI:$DEST --checksum
|
||||||
event:
|
environment:
|
||||||
exclude:
|
SSH_KEY:
|
||||||
- pull_request
|
from_secret: drone_ssh_key
|
||||||
|
SSH_URI:
|
||||||
|
from_secret: ssh_uri
|
||||||
|
DEST:
|
||||||
|
from_secret: destination
|
||||||
|
Loading…
Reference in New Issue
Block a user