From 8156ae17e19a8f0ad20819bafea0e5eb100260a1 Mon Sep 17 00:00:00 2001 From: Elia el Lazkani Date: Sun, 4 Jul 2021 08:59:25 +0200 Subject: [PATCH] enhance(): Adds the deploy phase --- .drone.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.drone.yml b/.drone.yml index c3a2291..18bdab8 100644 --- a/.drone.yml +++ b/.drone.yml @@ -14,3 +14,25 @@ steps: hugo_version: 0.84.4 validate: true pull: always + +- name: deploy + image: alpine + volumes: + - name: blog-path + path: /blog/ + environment: + UID: + from_secret: uid + GID: + from_secret: gid + commands: + - chown -R "$UID":"$GID" public/* + - mv public/ "/blog/${DRONE_COMMIT}" + - cd /blog/ + - rm -f blog.lazkani.io + - ln -s "${DRONE_COMMIT}" blog.lazkani.io + +volumes: + - name: blog-path + host: + path: /mnt/blog/