hugo-theme-hilfe/.drone.yml
2020-01-12 17:29:21 +01:00

127 lines
2.3 KiB
YAML

---
kind: pipeline
name: build
platform:
os: linux
arch: amd64
steps:
- name: assets
image: node
commands:
- npm install -g gulp -s
- npm install -s
- gulp default
- name: test
image: klakegg/hugo:0.59.1-ext-alpine
commands:
- cd exampleSite/
- mkdir themes/ && ln -s ../../. themes/hugo-geekdoc && hugo-official
- name: build
image: alpine
commands:
- mkdir dist/
- tar -zcvf dist/hugo-geekdoc.tar.gz . --exclude='.git*' --exclude='.drone*' --exclude='dist' --exclude='.git*' --exclude='example*' --exclude='src' --exclude='gulp*' --exclude='package*' --exclude='node*'
- name: checksum
image: alpine
commands:
- cd dist/ && sha256sum * > ../sha256sum.txt
- cd ../ && ls -lh dist/
- cat sha256sum.txt
- name: publish
image: plugins/github-release
settings:
api_key:
from_secret: github_token
files:
- dist/*
- sha256sum.txt
note: CHANGELOG.md
overwrite: true
title: ${DRONE_TAG}
when:
ref:
- refs/tags/**
trigger:
ref:
- refs/heads/master
- refs/tags/**
- refs/pull/**
---
kind: pipeline
name: docs
platform:
os: linux
arch: amd64
steps:
- name: assets
image: byrnedo/alpine-curl
commands:
- mkdir -p exampleSite/themes/hugo-geekdoc/
- curl -L https://github.com/xoxys/hugo-geekdoc/releases/download/v0.1.0/hugo-geekdoc.tar.gz | tar -xz -C exampleSite/themes/hugo-geekdoc/ --strip-components=1
- name: test
image: klakegg/hugo:0.59.1-ext-alpine
commands:
- cd exampleSite/ && hugo-official
trigger:
ref:
- refs/heads/master
depends_on:
- build
---
kind: pipeline
name: notifications
platform:
os: linux
arch: amd64
steps:
- name: matrix
image: plugins/matrix
settings:
homeserver:
from_secret: matrix_homeserver
password:
from_secret: matrix_password
roomid:
from_secret: matrix_roomid
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
username:
from_secret: matrix_username
when:
status:
- success
- failure
trigger:
ref:
- refs/heads/master
- refs/tags/**
status:
- success
- failure
depends_on:
- build
- docs
---
kind: signature
hmac: b8bb39bf0e41da63f5ad5f7de146c9301fabb5153b42bf43ca7648df100c17da
...