diff --git a/.drone.yml b/.drone.yml index 6bae9e7..171adbe 100644 --- a/.drone.yml +++ b/.drone.yml @@ -9,11 +9,7 @@ steps: - name: hugo image: code.ndumas.com/ndumas/hugo:latest commands: - - ls -lah $DRONE_WORKSPACE/hugo_cache/ - HUGO_CACHEDIR="/$DRONE_WORKSPACE/hugo_cache/" sh $DRONE_WORKSPACE/build.sh $DRONE_BRANCH - volumes: - - name: go_module_cache - path: /drone/src/hugo_cache/ - name: publish_prod depends_on: - hugo @@ -68,7 +64,3 @@ steps: branch: include: - drafts -volumes: - - name: go_module_cache - host: - path: /var/cache/go/hugo_cache/ diff --git a/build.sh b/build.sh index 66244eb..1b88f73 100755 --- a/build.sh +++ b/build.sh @@ -1,16 +1,17 @@ #! /bin/bash +HUGOCMD="hugo --enableGitInfo" # debug alias -# alias hugo=hugo -v --debug --logLevel=debug --printI18nWarnings --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints +#HUGOCMD="hugo --enableGitInfo -v --debug --logLevel=debug --printI18nWarnings --printPathWarnings --printUnusedTemplates --templateMetrics --templateMetricsHints" case $1 in main) - hugo --enableGitInfo -d /drone/src/public/ --baseURL https://blog.ndumas.com + $HUGOCMD -d /drone/src/public/ --baseURL https://blog.ndumas.com ;; dev) - hugo --enableGitInfo -d /drone/src/public/ --baseURL https://dev.blog.ndumas.com + $HUGOCMD -d /drone/src/public/ --baseURL https://dev.blog.ndumas.com ;; drafts) - hugo --enableGitInfo -DF -d /drone/src/public/ --baseURL https://drafts.blog.ndumas.com + $HUGOCMD -DF -d /drone/src/public/ --baseURL https://drafts.blog.ndumas.com ;; esac