You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

100 lines
1.8 KiB
YAML

kind: pipeline
name: blog
type: docker
clone:
depth: 1
steps:
5 months ago
- name: hugo_prod
image: code.ndumas.com/ndumas/hugo:latest
commands:
- ./build.sh main
5 months ago
when:
branch:
include:
- main
volumes:
- name: go_module_cache
path: /tmp/hugo_cache/
5 months ago
- name: hugo_dev
image: code.ndumas.com/ndumas/hugo
commands:
- ./build.sh dev
5 months ago
when:
branch:
include:
- dev
volumes:
- name: go_module_cache
path: /tmp/hugo_cache/
5 months ago
- name: hugo_drafts
image: code.ndumas.com/ndumas/hugo
commands:
- ./build.sh drafts
5 months ago
when:
branch:
include:
- drafts
volumes:
- name: go_module_cache
path: /tmp/hugo_cache/
- name: publish_prod
5 months ago
depends_on:
- hugo_prod
image: drillster/drone-rsync
settings:
key:
from_secret: BLOG_DEPLOY_KEY
user: blog
delete: true
recursive: true
hosts: ["blog.ndumas.com"]
source: /drone/src/public/
5 months ago
target: /var/www/blog.ndumas.com/
include: ["*"]
when:
branch:
include:
- main
- name: publish_dev
5 months ago
depends_on:
- hugo_dev
image: drillster/drone-rsync
settings:
key:
from_secret: BLOG_DEPLOY_KEY
user: blog
delete: true
recursive: true
hosts: ["blog.ndumas.com"]
source: /drone/src/public/
target: /var/www/dev.blog.ndumas.com/
include: ["*"]
when:
branch:
include:
- dev
- name: publish_drafts
5 months ago
depends_on:
- hugo_drafts
image: drillster/drone-rsync
settings:
key:
from_secret: BLOG_DEPLOY_KEY
user: blog
delete: true
recursive: true
hosts: ["blog.ndumas.com"]
source: /drone/src/public/
target: /var/www/drafts.blog.ndumas.com/
include: ["*"]
when:
branch:
include:
- drafts
volumes:
- name: go_module_cache
host:
path: /var/cache/go/hugo_cache/