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

71 lines
1.5 KiB
YAML

9 months ago
kind: pipeline
name: hugo build and deploy
type: docker
platform:
os: linux
arch: amd64
trigger:
branch:
- main
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: mkdocs-material:1.0
pull: if-not-exists
volumes:
- name: site
path: /drone/src/docs
commands:
- cd doc && pip install -r requirements.txt && mkdocs build
# PUSH FILES TO SERVER
- name: deploy files on server
image: greglebreton/drone-rsync:aarch64
settings:
hosts: ["92.243.16.7"]
target: /workspace/terminal-cv/site/resources/resume.pdf
source: ./out.pdf
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 ]