This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
geeklabor_legacy/.drone.yml

93 lines
2.2 KiB
YAML
Raw Normal View History

2019-01-13 14:58:22 +00:00
---
kind: pipeline
name: default
steps:
- name: build-draft
2018-12-20 09:49:51 +00:00
image: plugins/hugo
2019-02-07 22:05:23 +00:00
pull: always
2019-01-13 15:09:18 +00:00
settings:
2019-02-07 22:05:23 +00:00
hugoVersion: 0.53
2019-01-13 15:09:18 +00:00
validate: true
buildDrafts: true
buildExpired: true
buildFuture: true
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
2018-12-20 09:49:51 +00:00
image: plugins/hugo
2019-01-13 15:09:18 +00:00
settings:
hugoVersion: 0.53
2019-01-13 15:09:18 +00:00
validate: true
theme: geeklab
2019-01-13 15:17:48 +00:00
when:
branch: [ master ]
event: [ push ]
2018-12-19 23:13:43 +00:00
- name: freeze
image: appleboy/drone-ssh
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/
- ln -sfn /var/www/virtual/geeklab/html/geeklabor_freeze /var/www/virtual/geeklab/geeklabor.de
when:
branch: [ master ]
event: [ push ]
2019-01-13 14:58:22 +00:00
- name: publish
image: appleboy/drone-scp
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 ]
- name: cleanup
image: appleboy/drone-ssh
settings:
host:
from_secret: ssh_host
username:
from_secret: ssh_username
key:
from_secret: ssh_key
script:
- ln -sfn /var/www/virtual/geeklab/html/geeklabor.de /var/www/virtual/geeklab/geeklabor.de
- rm -rf /var/www/virtual/geeklab/html/geeklabor_freeze/
when:
branch: [ master ]
event: [ push ]
- name: notify
image: plugins/matrix
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