|
|
@ -6,42 +6,17 @@ clone:
|
|
|
|
depth: 1
|
|
|
|
depth: 1
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- name: hugo_prod
|
|
|
|
- name: hugo
|
|
|
|
image: code.ndumas.com/ndumas/hugo:latest
|
|
|
|
image: code.ndumas.com/ndumas/hugo:latest
|
|
|
|
commands:
|
|
|
|
commands:
|
|
|
|
- /drone/src/build.sh main
|
|
|
|
- echo $DRONE_BRANCH
|
|
|
|
when:
|
|
|
|
- HUGO_CACHEDIR="/tmp/hugo_cache/" bash $DRONE_WORKSPACE/build.sh $DRONE_BRANCH
|
|
|
|
branch:
|
|
|
|
|
|
|
|
include:
|
|
|
|
|
|
|
|
- main
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
|
|
|
|
- name: hugo_dev
|
|
|
|
|
|
|
|
image: code.ndumas.com/ndumas/hugo
|
|
|
|
|
|
|
|
commands:
|
|
|
|
|
|
|
|
- /drone/src/build.sh dev
|
|
|
|
|
|
|
|
when:
|
|
|
|
|
|
|
|
branch:
|
|
|
|
|
|
|
|
include:
|
|
|
|
|
|
|
|
- dev
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
|
|
|
|
- name: hugo_drafts
|
|
|
|
|
|
|
|
image: code.ndumas.com/ndumas/hugo
|
|
|
|
|
|
|
|
commands:
|
|
|
|
|
|
|
|
- /drone/src/build.sh drafts
|
|
|
|
|
|
|
|
when:
|
|
|
|
|
|
|
|
branch:
|
|
|
|
|
|
|
|
include:
|
|
|
|
|
|
|
|
- drafts
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
volumes:
|
|
|
|
- name: go_module_cache
|
|
|
|
- name: go_module_cache
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
- name: publish_prod
|
|
|
|
- name: publish_prod
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
|
- hugo_prod
|
|
|
|
- hugo
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
settings:
|
|
|
|
settings:
|
|
|
|
key:
|
|
|
|
key:
|
|
|
@ -59,7 +34,7 @@ steps:
|
|
|
|
- main
|
|
|
|
- main
|
|
|
|
- name: publish_dev
|
|
|
|
- name: publish_dev
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
|
- hugo_dev
|
|
|
|
- hugo
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
settings:
|
|
|
|
settings:
|
|
|
|
key:
|
|
|
|
key:
|
|
|
@ -77,7 +52,7 @@ steps:
|
|
|
|
- dev
|
|
|
|
- dev
|
|
|
|
- name: publish_drafts
|
|
|
|
- name: publish_drafts
|
|
|
|
depends_on:
|
|
|
|
depends_on:
|
|
|
|
- hugo_drafts
|
|
|
|
- hugo
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
image: drillster/drone-rsync
|
|
|
|
settings:
|
|
|
|
settings:
|
|
|
|
key:
|
|
|
|
key:
|
|
|
|