general .drone.yml clean-up (#16)
All checks were successful
continuous-integration/drone/push Build is passing

refactor: positive rather than negative selection

* i.e. includes as opposed to excludes

chore: separate build and deploy pipeline

* this allows for more granular run conditions and constraints

refactor: remove redundant status==success assertion

Co-authored-by: surtur <a_mirre@utb.cz>
Reviewed-on: #16
Reviewed-by: dalahast <dalahast@noreply.git.dotya.ml>
Co-Authored-By: wanderer <wanderer@noreply.git.dotya.ml>
Co-Committed-By: wanderer <wanderer@noreply.git.dotya.ml>
This commit is contained in:
wanderer 2020-09-25 20:57:33 +02:00 committed by dalahast
parent 2d589bf19f
commit f5353973c2
Signed by: Gitea
GPG Key ID: 0DD13DBC6B5433D3

@ -24,7 +24,11 @@ steps:
---
kind: pipeline
type: docker
name: 'build and deploy'
name: build
platform:
os: linux
arch: amd64
depends_on:
- pull
@ -34,8 +38,40 @@ steps:
pull: if-not-exists
image: immawanderer/fedora-hugo:latest
when:
status:
- success
branch:
- master
event:
- push
- pull_request
commands:
- git submodule init
- git submodule update
- hugo version
- hugo --gc=true --minify
---
kind: pipeline
type: docker
name: deploy
platform:
os: linux
arch: amd64
trigger:
event:
exclude:
- pull_request
- tag
depends_on:
- build
steps:
- name: hugo-extended
pull: if-not-exists
image: immawanderer/fedora-hugo:latest
commands:
- git submodule init
- git submodule update
@ -50,10 +86,6 @@ steps:
- success
branch:
- master
event:
- push
- tag
- cron
depends_on:
- hugo-extended
environment:
@ -92,7 +124,7 @@ trigger:
- failure
depends_on:
- 'build and deploy'
- deploy
steps:
- name: discord
@ -138,7 +170,7 @@ trigger:
- failure
depends_on:
- 'build and deploy'
- deploy
steps:
- name: discord