59 lines
1.0 KiB
YAML
59 lines
1.0 KiB
YAML
---
|
|
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:
|
|
event:
|
|
- promote
|
|
target:
|
|
- production
|
|
|
|
steps:
|
|
- name: submodules
|
|
image: alpine/git
|
|
commands:
|
|
- git submodule update --init --recursive
|
|
|
|
- name: build
|
|
image: plugins/hugo
|
|
settings:
|
|
hugo_version: 0.82
|
|
validate: true
|
|
|
|
- name: deploy
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host: bbaovanc.com
|
|
port: 2222
|
|
username: droneci
|
|
key:
|
|
from_secret: SSH_KEY
|
|
target: /tmp/blog/
|
|
#target: /var/www/bbaovanc/blog/
|
|
rm: true
|
|
source: public/
|
|
strip_components: 1
|