ajout drone.yml
Some checks failed
continuous-integration/drone Build is failing

This commit is contained in:
Grégory Lebreton 2024-01-10 12:28:34 +01:00
parent 6a3c2ffb68
commit ba92a7cb06

62
.drone.yml Normal file
View File

@ -0,0 +1,62 @@
kind: pipeline
name: mkdocs build and deploy
type: docker
platform:
os: linux
arch: amd64
trigger:
branch:
- prod
steps:
# BUILD
- name: build hugo site
image: plugins/hugo
settings:
hugo_version: 0.111.3
# theme: silhouette-hugo
extended: true
validate: true
config: config.toml
content: content
output: ./public
commands:
- hugo
# PUSH FILES TO SERVER
- name: deploy files on server
image: drillster/drone-rsync
settings:
hosts: ["92.243.16.7"]
target: /var/www/html/git-guide
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 ]