docs/.drone.yml
greg 588591d2c0
All checks were successful
continuous-integration/drone/push Build is passing
test 2
2024-01-09 16:25:43 +01:00

58 lines
1.3 KiB
YAML

kind: pipeline
name: mkdocs build and deploy
type: docker
platform:
os: linux
arch: amd64
trigger:
branch:
- prod
steps:
# BUILD
- name: build
image: squidfunk/mkdocs-material:9
pull: if-not-exists
volumes:
- name: site
path: /drone/src/docs
commands:
- pip install -r requirements.txt && mkdocs build
# PUSH FILES TO SERVER
- name: deploy files on server
image: drillster/drone-rsync
settings:
hosts: ["92.243.16.7"]
target: /var/www/html/mkdoc/site
source: public/*
# port:
# from_secret: RSYNC_SSH_PORT
user:
from_secret: RSYNC_USER
key:
from_secret: RSYNC_HOST_KEY
# TO CONFIG AND TEST - SEND MAIL NOTIF
- name: notify
image: drillster/drone-email
settings:
from.address: contact@legaragenumerique.fr
host: mail.gandi.net
port: 465
# skip_verify: true
debug: true
username: contact@legaragenumerique.fr
password:
from_secret: MAIL_PASSWORD
recipients: [ contact@legaragenumerique.fr ]
subject: >
[{{ build.status }}]
{{ repo.owner }}/{{ repo.name }}
attachment: build-result.xml
body: >
<p>{{ duration build.started_at build.finished_at }}</p>
<p>{{ build.message }}</p>
# https://git.io/vgvPz
when:
status: [ success, failure ]