gcg-website/.drone.yml
Denys Konovalov 6e0f12eebd
All checks were successful
continuous-integration/drone/push Build is passing
trigger on rollback
2023-01-31 06:35:45 +01:00

105 lines
2.2 KiB
YAML

kind: pipeline
type: docker
name: prod
steps:
- name: hugo build
image: plugins/hugo
settings:
hugo_version: 0.110.0
validate: false
extended: true
url: https://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:
from_secret: ssh_port
user: web-push
key:
from_secret: ssh_key
source: public/
target: /opt/data/webdata/gcg-website/
recursive: true
delete: true
- 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
event:
- push
- cron
- rollback
---
kind: pipeline
type: docker
name: test
steps:
- name: test build
image: plugins/hugo
settings:
hugo_version: 0.110.0
validate: false
buildDrafts: true
buildFuture: true
extended: true
output: test
url: https://test.cantorgymnasium.de/
commands:
- apk add --update --no-cache tzdata
- /bin/drone-hugo
- name: deploy
image: drillster/drone-rsync
settings:
hosts: [ "cantorgymnasium.de" ]
port:
from_secret: ssh_port
user: web-push
key:
from_secret: ssh_key
source: test/
target: /opt/data/webdata/gcg-website-test/
recursive: true
delete: true
- 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
event:
- push
- cron
- rollback
depends_on:
- prod