|
|
|
@ -6,18 +6,7 @@ clone:
|
|
|
|
|
depth: 1
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: restore_cache
|
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
path: /var/cache/go/hugo_cache/
|
|
|
|
|
settings:
|
|
|
|
|
restore: true
|
|
|
|
|
mount:
|
|
|
|
|
- /drone/src/hugo_cache/
|
|
|
|
|
- name: hugo_prod
|
|
|
|
|
depends_on:
|
|
|
|
|
- restore_cache
|
|
|
|
|
image: code.ndumas.com/ndumas/hugo:latest
|
|
|
|
|
commands:
|
|
|
|
|
- hugo --enableGitInfo -d /drone/src/public/ --baseURL https://blog.ndumas.com
|
|
|
|
@ -25,9 +14,10 @@ steps:
|
|
|
|
|
branch:
|
|
|
|
|
include:
|
|
|
|
|
- main
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
|
- name: hugo_dev
|
|
|
|
|
depends_on:
|
|
|
|
|
- restore_cache
|
|
|
|
|
image: code.ndumas.com/ndumas/hugo
|
|
|
|
|
commands:
|
|
|
|
|
- hugo --enableGitInfo -d /drone/src/public/ --baseURL https://dev.blog.ndumas.com
|
|
|
|
@ -35,9 +25,10 @@ steps:
|
|
|
|
|
branch:
|
|
|
|
|
include:
|
|
|
|
|
- dev
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
|
- name: hugo_drafts
|
|
|
|
|
depends_on:
|
|
|
|
|
- restore_cache
|
|
|
|
|
image: code.ndumas.com/ndumas/hugo
|
|
|
|
|
commands:
|
|
|
|
|
- hugo --enableGitInfo -DF -d /drone/src/public/ --baseURL https://drafts.blog.ndumas.com
|
|
|
|
@ -45,6 +36,9 @@ steps:
|
|
|
|
|
branch:
|
|
|
|
|
include:
|
|
|
|
|
- drafts
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
path: /tmp/hugo_cache/
|
|
|
|
|
- name: publish_prod
|
|
|
|
|
depends_on:
|
|
|
|
|
- hugo_prod
|
|
|
|
@ -99,19 +93,6 @@ steps:
|
|
|
|
|
branch:
|
|
|
|
|
include:
|
|
|
|
|
- drafts
|
|
|
|
|
- name: rebuild_cache
|
|
|
|
|
depends_on:
|
|
|
|
|
- publish_prod
|
|
|
|
|
- publish_dev
|
|
|
|
|
- publish_drafts
|
|
|
|
|
image: drillster/drone-volume-cache
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
path: /var/cache/go/hugo_cache/
|
|
|
|
|
settings:
|
|
|
|
|
rebuild: true
|
|
|
|
|
mount:
|
|
|
|
|
- /drone/src/hugo_cache/
|
|
|
|
|
volumes:
|
|
|
|
|
- name: go_module_cache
|
|
|
|
|
host:
|
|
|
|
|