From 200fa9aaf03a5c96d7baa4dab2ead9ee541bb614 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 13 Nov 2020 18:29:20 +0100 Subject: [PATCH 1/3] Use a more secure(tm) method for deployment --- .drone.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 2813168..fbe8fc4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -5,22 +5,23 @@ type: docker name: default steps: + - name: build + image: plugins/hugo + - name: deploy - image: alpine:3.12 - volumes: - - name: site - path: /var/www/html - commands: - - apk add --no-cache hugo - - hugo - - cp -r public/* /var/www/html + image: appleboy/drone-scp + settings: + host: dragon.luj0ga.de + username: www + key: + from_secret: ssh_key + passphrase: + from_secret: ssh_passphrase + target: /srv/www/sites/www.franconian.net/ + source: public/* + rm: yes when: event: - push branch: - main - -volumes: - - name: site - host: - path: /srv/www/sites/www.franconian.net From 65d374ca5a091b82ee6916b14b8e7acf8bda245b Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 13 Nov 2020 18:40:46 +0100 Subject: [PATCH 2/3] Let 'resources.ToCSS' handle SASS minification --- layouts/_default/baseof.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3e825e7..ae7c827 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -7,7 +7,7 @@ {{ .Site.Title }} {{ end }} - {{ $style := resources.Get "style.scss" | resources.ToCSS | minify }} + {{ $style := resources.Get "style.scss" | resources.ToCSS (dict "outputStyle" "compressed") }} From 7efb75124a9a259ca1e33abd33559deaf67395df Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 13 Nov 2020 18:53:46 +0100 Subject: [PATCH 3/3] Use 'hugo-extended' --- .drone.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.drone.yml b/.drone.yml index fbe8fc4..92acd19 100644 --- a/.drone.yml +++ b/.drone.yml @@ -7,6 +7,9 @@ name: default steps: - name: build image: plugins/hugo + settings: + extended: yes + validate: yes - name: deploy image: appleboy/drone-scp