hugo-site/.drone.yml

88 lines
1.7 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 site on server
image: drillster/drone-rsync
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: web CV to PDF
image: python
commands:
- python3 -m pip install weasyprint
- python3 web-to-pdf.py
- ls -la
# - name: deploy cv on terminal-cv
# image: drillster/drone-rsync
# settings:
# hosts: ["192.168.1.101"]
# target: /workspace/terminal-cv/site/...
# source: ./CV.pdf
# port: 2021
# user:
# from_secret: RSYNC_USER_STACK
# key:
# from_secret: RSYNC_SSH_KEY_STACK
- name: notification
image: appleboy/drone-telegram
settings:
token:
from_secret: TELEGRAM_TOKEN
to:
from_secret: TELEGRAM_USERID
when:
status:
- failure
- success
format: markdown
message: >
πŸ“ {{repo.name}} / {{commit.branch}} - {{commit.message}}
{{#success build.status}}
βœ… succeeded for πŸ‘·β€β™‚οΈ build {{build.number}}
{{else}}
πŸ›‘ failed for πŸ‘·β€β™‚οΈ build {{build.number}}
{{/success}}