2019-01-13 14:58:22 +00:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: build-draft
|
2019-02-07 22:46:14 +00:00
|
|
|
image: klakegg/hugo:0.53-alpine
|
|
|
|
commands:
|
2019-02-07 22:48:50 +00:00
|
|
|
- hugo -D -E -F --theme geeklab
|
2019-01-13 15:17:48 +00:00
|
|
|
when:
|
|
|
|
branch: [ draft ]
|
|
|
|
event: [ push ]
|
2018-12-19 23:13:43 +00:00
|
|
|
|
2019-01-13 14:58:22 +00:00
|
|
|
- name: build
|
2019-02-07 22:59:37 +00:00
|
|
|
image: klakegg/hugo:0.53-alpine
|
|
|
|
commands:
|
|
|
|
- hugo --theme geeklab
|
2019-01-13 15:17:48 +00:00
|
|
|
when:
|
|
|
|
branch: [ master ]
|
|
|
|
event: [ push ]
|
2018-12-19 23:13:43 +00:00
|
|
|
|
2019-01-27 15:39:32 +00:00
|
|
|
- name: freeze
|
|
|
|
image: appleboy/drone-ssh
|
2019-02-07 22:59:37 +00:00
|
|
|
pull: always
|
2019-01-27 15:39:32 +00:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
username:
|
|
|
|
from_secret: ssh_username
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
script:
|
|
|
|
- cp -R /var/www/virtual/geeklab/html/geeklabor.de/ /var/www/virtual/geeklab/html/geeklabor_freeze/
|
2019-02-04 19:13:27 +00:00
|
|
|
- ln -sfn /var/www/virtual/geeklab/html/geeklabor_freeze /var/www/virtual/geeklab/geeklabor.de
|
2019-01-27 15:39:32 +00:00
|
|
|
when:
|
|
|
|
branch: [ master ]
|
|
|
|
event: [ push ]
|
|
|
|
|
2019-01-13 14:58:22 +00:00
|
|
|
- name: publish
|
2018-12-20 00:17:28 +00:00
|
|
|
image: appleboy/drone-scp
|
2019-02-07 22:59:37 +00:00
|
|
|
pull: always
|
2019-01-13 15:09:18 +00:00
|
|
|
settings:
|
|
|
|
source: public/*
|
|
|
|
target: /var/www/virtual/geeklab/html/geeklabor.de/
|
2019-01-13 15:14:24 +00:00
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
username:
|
|
|
|
from_secret: ssh_username
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
2019-01-13 15:09:18 +00:00
|
|
|
strip_components: 1
|
|
|
|
rm: true
|
2019-01-13 15:17:48 +00:00
|
|
|
when:
|
|
|
|
branch: [ master ]
|
|
|
|
event: [ push ]
|
2019-01-27 15:06:12 +00:00
|
|
|
|
2019-01-27 15:39:32 +00:00
|
|
|
- name: cleanup
|
|
|
|
image: appleboy/drone-ssh
|
2019-02-07 22:59:37 +00:00
|
|
|
pull: always
|
2019-01-27 15:39:32 +00:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: ssh_host
|
|
|
|
username:
|
|
|
|
from_secret: ssh_username
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
script:
|
2019-02-04 19:13:27 +00:00
|
|
|
- ln -sfn /var/www/virtual/geeklab/html/geeklabor.de /var/www/virtual/geeklab/geeklabor.de
|
2019-01-27 15:39:32 +00:00
|
|
|
- rm -rf /var/www/virtual/geeklab/html/geeklabor_freeze/
|
|
|
|
when:
|
|
|
|
branch: [ master ]
|
|
|
|
event: [ push ]
|
|
|
|
|
2019-01-27 15:06:12 +00:00
|
|
|
- name: notify
|
|
|
|
image: plugins/matrix
|
2019-02-07 22:59:37 +00:00
|
|
|
pull: always
|
2019-01-27 15:06:12 +00:00
|
|
|
settings:
|
|
|
|
homeserver: https://matrix.rknet.org
|
|
|
|
roomid: MtidqQXWWAtQcByBhH:rknet.org
|
|
|
|
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
|
|
|
|
password:
|
|
|
|
from_secret: matrix_password
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|