nemunai.re/.drone.yml

63 lines
1.2 KiB
YAML

---
kind: pipeline
type: docker
name: default
steps:
- name: fetch submodules
image: alpine
commands:
- apk add --no-cache git
- git submodule init
- git submodule update --recursive --remote
- name: build production
image: plugins/hugo
settings:
hugo_version: 0.91.2
validate: true
environment:
HUGO_ENV: "production"
when:
branch:
- master
- name: build drafts
image: plugins/hugo
settings:
hugo_version: 0.91.2
validate: true
buildDrafts: true
buildExpired: true
buildFuture: true
environment:
HUGO_BASEURL: https://nemunai.re/${DRONE_BRANCH//\//-}/
when:
branch:
exclude:
- master
- name: publish on s3
image: plugins/s3
settings:
endpoint: https://storage.nemunai.re
path_style: true
bucket: nemunai.re-blog
access_key:
from_secret: s3_access_key
secret_key:
from_secret: s3_secret_key
source: public/**/*
strip_prefix: public/
target: /${DRONE_BRANCH//\//-}
trigger:
branch:
exclude:
- renovate/*
event:
- cron
- push
- tag
- custom