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-22 14:06:28 +01:00
|
|
|
- apk add --update --no-cache tzdata git
|
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
|
|
|
|
- git init public
|
|
|
|
|
2023-01-22 14:06:28 +01:00
|
|
|
- name: push public
|
2023-01-14 09:07:12 +00:00
|
|
|
image: appleboy/drone-git-push
|
|
|
|
settings:
|
|
|
|
branch: pages
|
|
|
|
remote:
|
|
|
|
from_secret: drone_remote
|
|
|
|
force: true
|
|
|
|
commit: true
|
2023-01-22 14:06:28 +01:00
|
|
|
commit_message: "[ci] website update"
|
2023-01-14 09:07:12 +00:00
|
|
|
path: public
|
|
|
|
author_name: GCG.Admin
|
|
|
|
author_email: admin@cantor-gymnasium.de
|
|
|
|
|
|
|
|
|
2023-01-22 14:06:28 +01:00
|
|
|
- name: notification
|
2023-01-14 09:07:12 +00:00
|
|
|
image: appleboy/drone-telegram
|
|
|
|
settings:
|
|
|
|
token:
|
|
|
|
from_secret: telegram_token
|
|
|
|
to:
|
|
|
|
from_secret: telegram_room_id
|
|
|
|
when:
|
|
|
|
status:
|
|
|
|
- success
|
|
|
|
- failure
|
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-14 09:07:12 +00:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|