From 09fe9bc5347e28c27e71ccf6bd7d27d440808cb9 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Sun, 11 Jun 2023 10:28:14 +0200 Subject: [PATCH] add drone --- .drone.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..ffc20e4 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,31 @@ +--- +kind: pipeline +type: ssh +name: production + +trigger: + branch: + - main + +server: + host: homelab-blog.lan + user: root + password: + from_secret: password + +steps: +- name: initialize + commands: + - git submodule update --init + - hugo version + # - ln -s /home/hebron/hugo_resources/production resources + +- name: build + commands: + - hugo --gc --minify -b https://blog.broillet.ch/ + +# - 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 {} \;" \ No newline at end of file