From d513a91b94fb434256304f281c74c4ba1a5e9ae1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 01:17:28 +0100 Subject: [PATCH 01/12] add deployment task to drone and a simple contact page --- .drone.yml | 16 ++++++++-------- content/contact.md | 3 +++ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index e734f77..895d60b 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,11 +18,11 @@ pipeline: branch: master event: push - # publish: - # image: appleboy/drone-scp - # source: public/* - # target: /var/www/virtual/geeklab/geeklabor.de - # secrets: [ ssh_username, ssh_password, ssh_key ] - # when: - # branch: master - # event: push + publish: + image: appleboy/drone-scp + source: public/* + target: /var/www/virtual/geeklab/geeklabor.de + secrets: [ ssh_username, ssh_key ] + when: + branch: master + event: push diff --git a/content/contact.md b/content/contact.md index fbfd740..e79578d 100644 --- a/content/contact.md +++ b/content/contact.md @@ -3,3 +3,6 @@ title: "Kontakt" date: 2018-10-11T14:36:10+02:00 draft: false --- + +### Persönlich +- E-Mail: mail [ett] geeklabor.de From 850dd5b658938c0868b128959611b6d22f283ad2 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 01:19:04 +0100 Subject: [PATCH 02/12] drone: add missing hostname to publish step --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index 895d60b..fe796ad 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,6 +20,7 @@ pipeline: publish: image: appleboy/drone-scp + host: machholz.uberspace.de source: public/* target: /var/www/virtual/geeklab/geeklabor.de secrets: [ ssh_username, ssh_key ] From ea121061dcecd617db67e78fc679f1e14c496f89 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 01:21:11 +0100 Subject: [PATCH 03/12] drone: fix target path --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index fe796ad..dbce4e4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -22,7 +22,7 @@ pipeline: image: appleboy/drone-scp host: machholz.uberspace.de source: public/* - target: /var/www/virtual/geeklab/geeklabor.de + target: /var/www/virtual/geeklab/html/geeklabor.de/ secrets: [ ssh_username, ssh_key ] when: branch: master From 0aec4574f3b3ff36d21edb34864de1e3ee8c2937 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 08:40:25 +0100 Subject: [PATCH 04/12] drone: strip fist path of source folder --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index dbce4e4..2bc005f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -20,10 +20,10 @@ pipeline: publish: image: appleboy/drone-scp - host: machholz.uberspace.de source: public/* target: /var/www/virtual/geeklab/html/geeklabor.de/ - secrets: [ ssh_username, ssh_key ] + secrets: [ ssh_host, ssh_username, ssh_key ] + strip_components: 1 when: branch: master event: push From cf8ffeb569361c68fdd8047e98263a7f5f24a3d8 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 08:44:06 +0100 Subject: [PATCH 05/12] drone: use current hugo version --- .drone.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.drone.yml b/.drone.yml index 2bc005f..df63fcc 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,7 @@ pipeline: build-draft: image: cbrgm/drone-hugo:latest + hugoVersion: 0.52 validate: true buildDrafts: true buildExpired: true @@ -12,6 +13,7 @@ pipeline: build-prod: image: cbrgm/drone-hugo:latest + hugoVersion: 0.52 validate: true theme: geeklab when: From f5c85bd05d38779e7d6c620259d8ec0f1ce7f405 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 09:40:34 +0100 Subject: [PATCH 06/12] drone: remove destination before copy --- .drone.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.drone.yml b/.drone.yml index df63fcc..56372a9 100644 --- a/.drone.yml +++ b/.drone.yml @@ -26,6 +26,7 @@ pipeline: target: /var/www/virtual/geeklab/html/geeklabor.de/ secrets: [ ssh_host, ssh_username, ssh_key ] strip_components: 1 + rm: true when: branch: master event: push From 665259736b246273dc267b275845ace97b51b6f7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:06:56 +0100 Subject: [PATCH 07/12] try alpine with hugo --- .drone.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.drone.yml b/.drone.yml index 56372a9..0c8027f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -12,10 +12,10 @@ pipeline: event: push build-prod: - image: cbrgm/drone-hugo:latest - hugoVersion: 0.52 - validate: true - theme: geeklab + image: alpine + command: + - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -O - | tar -xz + - ./hugo version when: branch: master event: push From 9dd0944af0d38800039cc57f4cbdea2cd226524b Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:08:05 +0100 Subject: [PATCH 08/12] fix typo --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 0c8027f..1c509da 100644 --- a/.drone.yml +++ b/.drone.yml @@ -13,7 +13,7 @@ pipeline: build-prod: image: alpine - command: + commands: - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -O - | tar -xz - ./hugo version when: From ea40f2253457d58a6bf79e298867c2c5d22d150a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:14:05 +0100 Subject: [PATCH 09/12] drone: switch to alpine with downloaded hugo --- .drone.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1c509da..55d100d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,11 +1,9 @@ pipeline: build-draft: - image: cbrgm/drone-hugo:latest - hugoVersion: 0.52 - validate: true - buildDrafts: true - buildExpired: true - buildFuture: true + image: alpine + commands: + - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz + - ./hugo -D -E -F --theme geeklab theme: geeklab when: branch: draft @@ -14,8 +12,8 @@ pipeline: build-prod: image: alpine commands: - - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -O - | tar -xz - - ./hugo version + - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz + - ./hugo -F --theme geeklab when: branch: master event: push From 03fba7d6c842b8a4ee0b4faa2a8c022a0cb1239a Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:15:31 +0100 Subject: [PATCH 10/12] drone: remove theme option --- .drone.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index 55d100d..93b70a4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,7 +3,7 @@ pipeline: image: alpine commands: - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -D -E -F --theme geeklab + - ./hugo -D -E -F theme: geeklab when: branch: draft @@ -13,7 +13,7 @@ pipeline: image: alpine commands: - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -F --theme geeklab + - ./hugo -F when: branch: master event: push From 4fad5dc77a39366bcfb1b05f08871906eb6936a7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:19:03 +0100 Subject: [PATCH 11/12] drone: fix yaml --- .drone.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index 93b70a4..6481439 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,8 +3,7 @@ pipeline: image: alpine commands: - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -D -E -F - theme: geeklab + - ./hugo -D -E -F --theme geeklab when: branch: draft event: push @@ -13,7 +12,7 @@ pipeline: image: alpine commands: - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -F + - ./hugo -F --theme geeklab when: branch: master event: push From fcbbbf01f35db7f113f588ee0ef805a96f566039 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Thu, 20 Dec 2018 10:49:51 +0100 Subject: [PATCH 12/12] drone: switch to new hugo plugin --- .drone.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6481439..e9cffef 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,18 +1,22 @@ pipeline: build-draft: - image: alpine - commands: - - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -D -E -F --theme geeklab + image: plugins/hugo + hugoVersion: 0.52 + validate: true + buildDrafts: true + buildExpired: true + buildFuture: true + theme: geeklab when: branch: draft event: push build-prod: - image: alpine - commands: - - wget https://github.com/gohugoio/hugo/releases/download/v0.52/hugo_0.52_Linux-64bit.tar.gz -q -O - | tar -xz - - ./hugo -F --theme geeklab + image: plugins/hugo + hugoVersion: 0.52 + validate: true + buildFuture: true + theme: geeklab when: branch: master event: push