nemunai.re/.drone.yml

67 lines
1.2 KiB
YAML
Raw Normal View History

2021-07-23 22:11:27 +00:00
---
kind: pipeline
type: docker
name: default
2023-04-15 15:13:45 +00:00
platform:
os: linux
arch: arm64
2021-07-23 22:11:27 +00:00
steps:
- name: fetch submodules
image: alpine
commands:
- apk add --no-cache git
- git submodule init
- git submodule update --recursive --remote
2023-04-15 15:11:27 +00:00
- name: build production
2021-07-23 22:11:27 +00:00
image: plugins/hugo
settings:
2023-04-15 15:11:27 +00:00
hugo_version: 0.91.2
2021-07-23 22:11:27 +00:00
validate: true
2023-04-15 15:11:27 +00:00
environment:
HUGO_ENV: "production"
when:
branch:
- master
2021-07-23 22:11:27 +00:00
2023-04-15 15:11:27 +00:00
- name: build drafts
image: plugins/hugo
2021-07-23 22:11:27 +00:00
settings:
2023-04-15 15:11:27 +00:00
hugo_version: 0.91.2
validate: true
buildDrafts: true
buildExpired: true
buildFuture: true
environment:
HUGO_BASEURL: https://nemunai.re/${DRONE_BRANCH//\//-}/
2021-07-23 22:11:27 +00:00
when:
branch:
exclude:
2023-04-15 15:11:27 +00:00
- 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