docs/.drone.yml
greg 4cae3b7391
Some checks failed
continuous-integration/drone/push Build is failing
maj drone.yml
2024-01-09 12:08:48 +01:00

71 lines
1.5 KiB
YAML

kind: pipeline
name: mkdocs build and deploy
type: docker
platform:
os: linux
arch: amd64
trigger:
branch:
- greg
steps:
# GIT PULL
# - name: git pull submodules
# image: alpine/git
# settings:
# user:
# from_secret: GIT_USER
# password:
# from_secret: GIT_PASSWORD
# commands:
# - git submodule update --init --recursive
# BUILD
- name: build
# ARM version of mkDocs
# image: ghcr.io/afritzler/mkdocs-material:8.1.0
image: squidfunk/mkdocs-material:9
pull: if-not-exists
volumes:
- name: site
path: /drone/src/docs
commands:
- cd docs && 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: drone@legaragenumerique.fr
host: mail.gandi.net
port: 465
# skip_verify: true
debug: true
username: drone@legaragenumerique.fr
password:
from_secret: MAIL_PASSWORD
recipients: [ greg@legaragenumerique.fr ]
subject: >
[{{ build.status }}]
{{ repo.owner }}/{{ repo.name }}
({{ build.branch }} - {{ truncate build.commit 8 }})
attachment: build-result.xml
body:
https://git.io/vgvPz
when:
status: [ success, failure ]