Use promotions and hugo plugin
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
BBaoVanC 2021-04-18 15:00:26 -05:00
parent adf52c8498
commit 66b23ebdea
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A

View File

@ -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