gcg-website/.drone.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2023-01-14 09:07:12 +00:00
kind: pipeline
type: docker
name: website-build
platform:
os: linux
arch: amd64
steps:
2023-01-22 14:06:28 +01:00
- name: hugo build
2023-01-14 09:07:12 +00:00
image: plugins/hugo
settings:
2023-01-22 14:06:28 +01:00
hugo_version: 0.110.0
2023-01-14 09:07:12 +00:00
validate: false
extended: true
2023-01-22 14:06:28 +01:00
url: https://dev.cantorgymnasium.de
2023-01-14 09:07:12 +00:00
commands:
2023-01-24 15:38:37 +01:00
- apk add --update --no-cache tzdata
2023-01-14 09:07:12 +00:00
- /bin/drone-hugo
- find public -type f -regex '.*\.\(htm\|html\|txt\|text\|js\|css\)$' -print0 | xargs -0 gzip -9 -f -k
2023-01-24 15:36:15 +01:00
- name: deploy
2023-01-24 15:37:27 +01:00
image: drillster/drone-rsync
settings:
hosts: [ "cantorgymnasium.de" ]
port:
from_secret: ssh_port
user: web-push
key:
from_secret: ssh_key
source: public/
target: /opt/data/webdata/gcg-website/
recursive: true
delete: true
2023-01-24 15:36:15 +01:00
2023-01-24 15:38:37 +01:00
- name: notification
image: appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_room_id
when:
status:
- success
- failure
2023-01-14 09:07:12 +00:00
trigger:
branch:
- master