From b90a2b66bdecc14506e7bc8c1f8078fffb409447 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Tue, 2 Jul 2024 19:05:21 -0400 Subject: [PATCH] Okay, this should cover all 3 envs --- .drone.yml | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index ea67b98..e9f4ab1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -30,7 +30,9 @@ steps: branch: include: - drafts -- name: publish +- name: publish_prod + depends_on: + - hugo_prod image: drillster/drone-rsync settings: key: @@ -42,3 +44,43 @@ steps: source: /drone/src/public/ target: /var/www/blog.ndumas.com/ include: ["*"] + when: + branch: + include: + - main +- name: publish_dev + depends_on: + - hugo_dev + image: drillster/drone-rsync + settings: + key: + from_secret: BLOG_DEPLOY_KEY + user: blog + delete: true + recursive: true + hosts: ["blog.ndumas.com"] + source: /drone/src/public/ + target: /var/www/dev.blog.ndumas.com/ + include: ["*"] + when: + branch: + include: + - dev +- name: publish_drafts + depends_on: + - hugo_drafts + image: drillster/drone-rsync + settings: + key: + from_secret: BLOG_DEPLOY_KEY + user: blog + delete: true + recursive: true + hosts: ["blog.ndumas.com"] + source: /drone/src/public/ + target: /var/www/drafts.blog.ndumas.com/ + include: ["*"] + when: + branch: + include: + - drafts