From 0cac50609d977b631fc8983e558b0bf3c8942835 Mon Sep 17 00:00:00 2001 From: Mathieu Broillet Date: Sun, 11 Jun 2023 12:15:50 +0200 Subject: [PATCH] switch to drone ssh plugin instead of runner --- .drone.yml | 54 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/.drone.yml b/.drone.yml index 55127bf..d0609dc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,31 +1,37 @@ ---- kind: pipeline -type: ssh -name: production - -trigger: - branch: - - main - -server: - host: 192.168.10.119 - user: root - password: - from_secret: password +type: docker +name: default 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: initialize + image: appleboy/drone-ssh + settings: + host: + - homelab-blog.lan + username: root + password: + from_secret: password + port: 22 + command_timeout: 1m + script: + - apt install hugo -y + - git submodule update --init + - hugo version + # - ln -s /home/hebron/hugo_resources/production resources + - name: build + image: appleboy/drone-ssh + settings: + host: + - homelab-blog.lan + username: root + password: + from_secret: password + port: 22 + command_timeout: 1m + script: + - 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 +# - ssh cirrus -f "find /var/www/html/blog/ -maxdepth 1 -mtime +1 -type d -exec rm -r {} \;"