blog/.drone.yml
Mathieu Broillet 4c0f6b59fb
Some checks failed
continuous-integration/drone/push Build is failing
update drone
2023-06-11 12:58:03 +02:00

39 lines
836 B
YAML

---
kind: pipeline
type: ssh
name: production
trigger:
branch:
- main
server:
host: 192.168.10.119
user: root
ssh_key:
from_secret: ssh_key
steps:
- name: initialize
commands:
- git submodule update --init
- hugo version
- pwd && ls -l
# - ln -s /home/hebron/hugo_resources/production resources
- name: build
commands:
- hugo --gc --minify -b https://blog.broillet.ch/
- pwd && ls -l
- name: copy built website
commands:
- pwd && ls -l
- sleep 30
- cp public/ /var/www/html/blog/
# - 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"
# - ssh cirrus -f "find /var/www/html/blog/ -maxdepth 1 -mtime +1 -type d -exec rm -r {} \;"