2023-06-11 10:28:14 +02:00
|
|
|
kind: pipeline
|
2023-06-11 12:15:50 +02:00
|
|
|
type: docker
|
|
|
|
name: default
|
2023-06-11 10:28:14 +02:00
|
|
|
|
|
|
|
steps:
|
2023-06-11 12:20:43 +02:00
|
|
|
- name: build
|
2023-06-11 12:15:50 +02:00
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host:
|
2023-06-11 12:31:24 +02:00
|
|
|
- homelab-blog.lan
|
2023-06-11 12:15:50 +02:00
|
|
|
username: root
|
2023-06-11 12:31:24 +02:00
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
2023-06-11 12:15:50 +02:00
|
|
|
port: 22
|
|
|
|
command_timeout: 1m
|
|
|
|
script:
|
|
|
|
- apt install hugo -y
|
|
|
|
- git submodule update --init
|
|
|
|
- hugo version
|
|
|
|
# - ln -s /home/hebron/hugo_resources/production resources
|
|
|
|
- hugo --gc --minify -b https://blog.broillet.ch/
|
2023-06-11 12:20:43 +02:00
|
|
|
|
2023-06-11 10:28:14 +02:00
|
|
|
# - name: vps-deploy
|
|
|
|
# commands:
|
|
|
|
# - rsync -ah --stats public/ cirrus:/var/www/html/blog/${DRONE_COMMIT_SHA:0:8}
|
|
|
|
# - ssh cirrus -f "ln -sfn /var/www/html/blog/${DRONE_COMMIT_SHA:0:8} /var/www/html/blog/deployed"
|
2023-06-11 12:15:50 +02:00
|
|
|
# - ssh cirrus -f "find /var/www/html/blog/ -maxdepth 1 -mtime +1 -type d -exec rm -r {} \;"
|