You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
kind: pipeline
|
|
|
name: hugo
|
|
|
type: docker
|
|
|
|
|
|
platform:
|
|
|
os: linux
|
|
|
arch: arm64
|
|
|
|
|
|
trigger:
|
|
|
branch:
|
|
|
- main
|
|
|
|
|
|
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: greglebreton/drone-hugo:arm64
|
|
|
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
|
|
|
# - /bin/drone-hugo version
|
|
|
- ls -la
|
|
|
# - /bin/drone-hugo
|
|
|
# - whoami
|
|
|
|
|
|
- name: deploy site on server
|
|
|
image: greglebreton/drone-rsync:aarch64
|
|
|
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: greglebreton/drone-email:arm64
|
|
|
settings:
|
|
|
from.address: greg@gregandev.fr
|
|
|
host: mail.gandi.net
|
|
|
port: 465
|
|
|
debug: true
|
|
|
username: greg@gregandev.fr
|
|
|
password:
|
|
|
from_secret: MAIL_PASSWORD
|
|
|
recipients: [ greg@gregandev.fr ]
|
|
|
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://git.gregandev.fr/assets/img/logo.svg'/>
|
|
|
when:
|
|
|
status: [ success, failure ] |