ci: dev: add dev build and deploy
This commit is contained in:
parent
1814060f97
commit
94f0f18f39
38
.drone.yml
38
.drone.yml
|
@ -10,6 +10,7 @@ steps:
|
|||
image: plugins/git
|
||||
recursive: true
|
||||
|
||||
# Production build and deploy
|
||||
- name: build
|
||||
image: klakegg/hugo
|
||||
commands:
|
||||
|
@ -17,6 +18,9 @@ steps:
|
|||
- hugo --minify
|
||||
environment:
|
||||
HUGO_ENV: production
|
||||
when:
|
||||
branch:
|
||||
- master
|
||||
|
||||
- name: deploy
|
||||
image: appleboy/drone-scp
|
||||
|
@ -37,6 +41,36 @@ steps:
|
|||
when:
|
||||
branch:
|
||||
- master
|
||||
event:
|
||||
|
||||
# Dev build and deploy
|
||||
- name: build-dev
|
||||
image: klakegg/hugo
|
||||
commands:
|
||||
- hugo version
|
||||
# Include drafts and future articles, use dev base url
|
||||
- hugo --minify -D -F -b https://dev.belanyi.fr
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- pull_request
|
||||
- master
|
||||
|
||||
- name: deploy-dev
|
||||
image: appleboy/drone-scp
|
||||
settings:
|
||||
source: public/*
|
||||
strip_components: 1 # Make sure the tarball doesn't contain leading path
|
||||
rm: true # Make sure only the newly generated files are left
|
||||
host:
|
||||
from_secret: ssh_host
|
||||
target:
|
||||
from_secret: ssh_target_dev
|
||||
username:
|
||||
from_secret: ssh_user
|
||||
key:
|
||||
from_secret: ssh_key
|
||||
port:
|
||||
from_secret: ssh_port
|
||||
when:
|
||||
branch:
|
||||
exclude:
|
||||
- master
|
||||
|
|
Loading…
Reference in a new issue