Use promotions and hugo plugin
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
adf52c8498
commit
66b23ebdea
46
.drone.yml
46
.drone.yml
@ -1,28 +1,49 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Build and validate
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
steps:
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
|
||||
- name: build
|
||||
image: plugins/hugo
|
||||
settings:
|
||||
hugo_version: 0.82
|
||||
validate: true
|
||||
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: Deploy to bbaovanc.com
|
||||
|
||||
trigger:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
||||
- promote
|
||||
target:
|
||||
- production
|
||||
|
||||
steps:
|
||||
- name: Update submodules
|
||||
- name: submodules
|
||||
image: alpine/git
|
||||
commands:
|
||||
- git submodule update --init --recursive
|
||||
|
||||
- name: Build site
|
||||
image: mapitman/docker-hugo
|
||||
commands:
|
||||
- hugo version
|
||||
- hugo --minify
|
||||
- name: build
|
||||
image: plugins/hugo
|
||||
settings:
|
||||
hugo_version: 0.82
|
||||
validate: true
|
||||
|
||||
- name: Upload files
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
host: bbaovanc.com
|
||||
@ -30,7 +51,8 @@ steps:
|
||||
username: droneci
|
||||
key:
|
||||
from_secret: SSH_KEY
|
||||
target: /var/www/bbaovanc/blog/
|
||||
target: /tmp/blog/
|
||||
#target: /var/www/bbaovanc/blog/
|
||||
rm: true
|
||||
source: public/
|
||||
strip_components: 1
|
||||
|
Reference in New Issue
Block a user