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
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: Deploy to bbaovanc.com
|
name: Deploy to bbaovanc.com
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
event:
|
event:
|
||||||
exclude:
|
- promote
|
||||||
- pull_request
|
target:
|
||||||
|
- production
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Update submodules
|
- name: submodules
|
||||||
image: alpine/git
|
image: alpine/git
|
||||||
commands:
|
commands:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Build site
|
- name: build
|
||||||
image: mapitman/docker-hugo
|
image: plugins/hugo
|
||||||
commands:
|
settings:
|
||||||
- hugo version
|
hugo_version: 0.82
|
||||||
- hugo --minify
|
validate: true
|
||||||
|
|
||||||
- name: Upload files
|
- name: deploy
|
||||||
image: appleboy/drone-scp
|
image: appleboy/drone-scp
|
||||||
settings:
|
settings:
|
||||||
host: bbaovanc.com
|
host: bbaovanc.com
|
||||||
@ -30,7 +51,8 @@ steps:
|
|||||||
username: droneci
|
username: droneci
|
||||||
key:
|
key:
|
||||||
from_secret: SSH_KEY
|
from_secret: SSH_KEY
|
||||||
target: /var/www/bbaovanc/blog/
|
target: /tmp/blog/
|
||||||
|
#target: /var/www/bbaovanc/blog/
|
||||||
rm: true
|
rm: true
|
||||||
source: public/
|
source: public/
|
||||||
strip_components: 1
|
strip_components: 1
|
||||||
|
Reference in New Issue
Block a user