From 24ecf51c490416bd5d0fff6d7b92bd35606b02e9 Mon Sep 17 00:00:00 2001 From: Nick Dumas Date: Wed, 3 Jul 2024 11:41:52 -0400 Subject: [PATCH] I have to do this refactor sooner or later --- .drone.yml | 37 ++++++------------------------------- build.sh | 1 - 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/.drone.yml b/.drone.yml index 63c6fc8..b7a2ecb 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,42 +6,17 @@ clone: depth: 1 steps: -- name: hugo_prod +- name: hugo image: code.ndumas.com/ndumas/hugo:latest commands: - - /drone/src/build.sh main - when: - branch: - include: - - main - volumes: - - name: go_module_cache - path: /tmp/hugo_cache/ -- name: hugo_dev - image: code.ndumas.com/ndumas/hugo - commands: - - /drone/src/build.sh dev - when: - branch: - include: - - dev - volumes: - - name: go_module_cache - path: /tmp/hugo_cache/ -- name: hugo_drafts - image: code.ndumas.com/ndumas/hugo - commands: - - /drone/src/build.sh drafts - when: - branch: - include: - - drafts + - echo $DRONE_BRANCH + - HUGO_CACHEDIR="/tmp/hugo_cache/" bash $DRONE_WORKSPACE/build.sh $DRONE_BRANCH volumes: - name: go_module_cache path: /tmp/hugo_cache/ - name: publish_prod depends_on: - - hugo_prod + - hugo image: drillster/drone-rsync settings: key: @@ -59,7 +34,7 @@ steps: - main - name: publish_dev depends_on: - - hugo_dev + - hugo image: drillster/drone-rsync settings: key: @@ -77,7 +52,7 @@ steps: - dev - name: publish_drafts depends_on: - - hugo_drafts + - hugo image: drillster/drone-rsync settings: key: diff --git a/build.sh b/build.sh index 28ecb30..66244eb 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,5 @@ #! /bin/bash -export HUGO_CACHEDIR="/tmp/hugo_cache/" # debug alias # alias hugo=hugo -v --debug --logLevel=debug --printI18nWarnings --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints