62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
kind: pipeline
|
|
name: build
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
steps:
|
|
- name: submodules
|
|
image: docker:git
|
|
commands:
|
|
- git submodule update --init
|
|
- git submodule update --recursive --remote
|
|
|
|
- name: theme
|
|
image: kolaente/yarn
|
|
pull: true
|
|
group: build-static
|
|
commands:
|
|
- cd themes/vikunja
|
|
- yarn --production=false
|
|
- ./node_modules/.bin/gulp prod
|
|
|
|
- name: build
|
|
image: monachus/hugo
|
|
pull: true
|
|
commands:
|
|
- hugo
|
|
depends_on: [ theme ]
|
|
|
|
- name: docker
|
|
image: plugins/docker
|
|
pull: true
|
|
settings:
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
repo: vikunja/website
|
|
tags: [ 'latest' ]
|
|
when:
|
|
event: [ push ]
|
|
branch: [ master ]
|
|
depends_on: [ build ]
|
|
|
|
- name: telegram
|
|
image: appleboy/drone-telegram:1-linux-amd64
|
|
depends_on:
|
|
- docker
|
|
settings:
|
|
token:
|
|
from_secret: TELEGRAM_TOKEN
|
|
to:
|
|
from_secret: TELEGRAM_TO
|
|
message: >
|
|
{{repo.owner}}/{{repo.name}}: \[{{build.status}}] Build {{build.number}}
|
|
{{commit.author}} pushed to {{commit.branch}} {{commit.sha}}: `{{commit.message}}`
|
|
Build started at {{datetime build.started "2006-Jan-02T15:04:05Z" "GMT+2"}} finished at {{datetime build.finished "2006-Jan-02T15:04:05Z" "GMT+2"}}.
|
|
when:
|
|
status:
|
|
- success
|
|
- failure |