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.
docs/.drone.yml

63 lines
1.5 KiB
YAML

9 months ago
kind: pipeline
9 months ago
name: mkdocs build and deploy
9 months ago
type: docker
platform:
os: linux
arch: amd64
trigger:
branch:
- prod
9 months ago
steps:
# BUILD
- name: build
9 months ago
image: squidfunk/mkdocs-material:9
9 months ago
pull: if-not-exists
volumes:
- name: site
path: /drone/src/docs
commands:
9 months ago
- pip install -r requirements.txt && mkdocs build
9 months ago
9 months ago
# PUSH FILES TO SERVER
- name: deploy files on server
9 months ago
image: drillster/drone-rsync
9 months ago
settings:
hosts: ["92.243.16.7"]
9 months ago
target: /var/www/html/mkdoc/site
9 months ago
source: public/*
9 months ago
# port:
# from_secret: RSYNC_SSH_PORT
9 months ago
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:
9 months ago
from.address: contact@legaragenumerique.fr
9 months ago
host: mail.gandi.net
port: 465
# skip_verify: true
debug: true
9 months ago
username: contact@legaragenumerique.fr
9 months ago
password:
from_secret: MAIL_PASSWORD
9 months ago
recipients: [ contact@legaragenumerique.fr ]
9 months ago
subject: >
[{{ build.status }}]
{{ repo.owner }}/{{ repo.name }}
body: >
📝 {{repo.name}} / {{commit.branch}} - {{commit.message}} <br />
{{#success build.status}}
✅ succeeded for 👷‍♂️ build {{build.number}}
{{else}}
🛑 failed for 👷‍♂️ build {{build.number}}
{{/success}}
<br /><img src='https://www.legaragenumerique.fr/wp-content/uploads/2019/10/logo-web-garage_numerique.png'/>
9 months ago
when:
9 months ago
status: [ success, failure ]