hugo-site/.drone.yml

71 lines
1.4 KiB
YAML

kind: pipeline
name: hugo
type: docker
platform:
os: linux
arch: arm64
trigger:
branch:
- master
steps:
- name: git pull submodules
image: alpine/git
settings:
user:
from_secret: GIT_USER
password:
from_secret: GIT_PASSWORD
commands:
- git submodule update --init --recursive
- name: build hugo site
image: plugins/hugo
settings:
hugo_version: 0.69.0
theme: ameida-cv
extended: true
validate: true
config: config.toml
content: content
output: ./public
commands:
- apk add libc6-compat libstdc++
- /bin/hugo
- name: deploy
image: drillster/drone-rsync # image docker permettant d'utiliser rsync pour déployer des fichiers sur un ou plusieurs hôtes
settings:
hosts: ["192.168.1.100"]
target: /var/www/html/hugo-site
source: public/*
port: 2021
user:
from_secret: RSYNC_USER
key:
from_secret: RSYNC_SSH_KEY
- name: notify
image: drillster/drone-email
settings:
from: drone@gregandev.fr
host: mail.gandi.net
port: 465
# skip_verify: true
debug: true
username: drone@gregandev.fr
password:
from-secret: MAIL_PASSWORD
recipients: [ greg@gregandev.fr ]
subject: >
[{{ build.status }}]
{{ repo.owner }}/{{ repo.name }}
({{ build.branch }} - {{ truncate build.commit 8 }})
attachment: build-result.xml
# body:
# https://git.io/vgvPz
when:
staus: [ success, failure ]