From ba984a1aa7b82ff118737f5d1e4e861ac79b109f Mon Sep 17 00:00:00 2001 From: paspo Date: Sun, 28 Jul 2024 09:39:14 +0200 Subject: [PATCH] hugo build con caching --- .gitea/workflows/build_and_push.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitea/workflows/build_and_push.yaml b/.gitea/workflows/build_and_push.yaml index 270b238..ae729de 100644 --- a/.gitea/workflows/build_and_push.yaml +++ b/.gitea/workflows/build_and_push.yaml @@ -19,6 +19,24 @@ jobs: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod + - uses: actions/cache/restore@v4 + with: + path: | + resources + key: bglug-it-hugo-resources + + - name: Build Hugo + uses: lowply/build-hugo@v0.129.0 + with: + args: --gc --minify --cleanDestinationDir + + - uses: actions/cache/save@v4 + if: always() # salva in cache anche se la build fallisce + with: + path: | + resources + key: bglug-it-hugo-resources + - name: Set up QEMU uses: docker/setup-qemu-action@v3