You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
58 lines
1.2 KiB
YAML
58 lines
1.2 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:
|
|
https://git.io/vgvPz
|
|
when:
|
|
status: [ success, failure ]
|
|
|