50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
kind: pipeline
|
|
type: docker
|
|
name: website-build
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
steps:
|
|
- name: hugo build
|
|
image: plugins/hugo
|
|
settings:
|
|
hugo_version: 0.110.0
|
|
validate: false
|
|
extended: true
|
|
url: https://dev.cantorgymnasium.de
|
|
commands:
|
|
- apk add --update --no-cache tzdata
|
|
- /bin/drone-hugo
|
|
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -print0 | xargs -0 gzip -9 -f -k
|
|
|
|
- name: deploy
|
|
image: drillster/drone-rsync
|
|
settings:
|
|
hosts: [ "cantorgymnasium.de" ]
|
|
port: 1845
|
|
user: root
|
|
key:
|
|
from_secret: ssh_key
|
|
source: public/
|
|
target: /opt/data/webdata/gcg-website/
|
|
recursive: true
|
|
delete: true
|
|
commands:
|
|
- PATH=/usr/bin/ /usr/local/upload.sh
|
|
|
|
- name: notification
|
|
image: appleboy/drone-telegram
|
|
settings:
|
|
token:
|
|
from_secret: telegram_token
|
|
to:
|
|
from_secret: telegram_room_id
|
|
when:
|
|
status:
|
|
- success
|
|
- failure
|
|
|
|
trigger:
|
|
branch:
|
|
- master
|