Browse Source

Build hugo files

Colin Powell 2 years ago
parent
commit
1c706f328f
1 changed files with 11 additions and 2 deletions
  1. 11 2
      .drone.yml

+ 11 - 2
.drone.yml

@@ -10,7 +10,10 @@ steps:
   - name: build
     image: klakegg/hugo:alpine
     commands:
-      - hugo
+      - hugo -d /.cache/hugo
+    volumes:
+      - name: hugo-build
+        path: /root/.build/hugo
   - name: publish
     image: drillster/drone-rsync
     settings:
@@ -19,10 +22,16 @@ steps:
         from_secret: key
       hosts:
         - box.unbl.ink
-      source: ./public
+      source: $HOME/.build/hugo/
       target: /home/user-data/www/unbl.ink/
       secrets: [ key ]
+    volumes:
+      - name: hugo-build
+        path: /root/.build/hugo
 volumes:
   - name: docker
     host:
       path: /var/run/docker.sock
+  - name: hugo-build
+    host:
+      path: /tmp/cache/drone/hugo