Skip to content

Commit f2ec2be

Browse files
author
marci
committed
Füge Cache-Management für Hugo-Builds hinzu und erweitere die Cache-Konfiguration in der hugo.yaml
1 parent cf687f9 commit f2ec2be

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/deploy-site.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,23 @@ jobs:
4444
uses: actions/configure-pages@v4
4545
- name: Install Node.js dependencies
4646
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
47+
- name: Cache Restore
48+
id: cache-restore
49+
uses: actions/cache/restore@v4
50+
with:
51+
path: |
52+
${{ runner.temp }}/hugo_cache
53+
key: hugo-${{ github.run_id }}
54+
restore-keys:
55+
hugo-
56+
- name: Cache Save
57+
id: cache-save
58+
uses: actions/cache/save@v4
59+
with:
60+
path: |
61+
${{ runner.temp }}/hugo_cache
62+
key: ${{ steps.cache-restore.outputs.cache-primary-key }}
63+
4764
- name: Build with Hugo
4865
env:
4966
# For maximum backward compatibility with Hugo modules

hugo.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,30 @@ baseURL: https://securebitsorg.github.io/
33
languageCode: de-de
44
title: "SecureBits Blog by Marcel Dellmann"
55

6+
caches:
7+
images:
8+
dir: :cacheDir/images
9+
assets:
10+
dir: :resourceDir/_gen
11+
maxAge: -1
12+
getcsv:
13+
dir: :cacheDir/:project
14+
maxAge: -1
15+
getjson:
16+
dir: :cacheDir/:project
17+
maxAge: -1
18+
getresource:
19+
dir: :cacheDir/:project
20+
maxAge: -1
21+
images:
22+
dir: :resourceDir/_gen
23+
maxAge: -1
24+
misc:
25+
dir: :cacheDir/:project
26+
maxAge: -1
27+
modules:
28+
dir: :cacheDir/modules
29+
maxAge: -1
630
# Use Hugo modules to add theme
731

832
module:

0 commit comments

Comments
 (0)