Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/setup-hugo/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ runs:
extended: true

- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Cache Bun dependencies
uses: actions/cache@v5
Expand Down
32 changes: 13 additions & 19 deletions .github/workflows/_hugo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:

env:
HUGO_ENVIRONMENT: production
HUGO_CACHEDIR: /tmp/hugo_cache


jobs:
Expand Down Expand Up @@ -42,7 +41,9 @@ jobs:
${{ runner.os }}-deps-

- uses: oven-sh/setup-bun@v2
- run: bun install
with:
bun-version: latest
- run: bun install --frozen-lockfile

# Use Bun as the "node" runtime for Hugo's PostCSS pipeline.
# Hugo 0.161+ runs Node tools with --permission flags; Bun ignores
Expand All @@ -54,30 +55,23 @@ jobs:
ln -sf "$(which bun)" "$HOME/.bun-as-node/node"
echo "$HOME/.bun-as-node" >> "$GITHUB_PATH"

# Tier 2: Hugo build cache (changes with any build-affecting file)
# Tier 2a: Hugo image cache (survives CSS/HTML changes)
- uses: actions/cache@v5
name: Cache Hugo build resources
name: Cache Hugo processed images
with:
path: |
${{ env.HUGO_CACHEDIR }}
resources/_gen
key: ${{ runner.os }}-hugo-build-${{ hashFiles('hugo.toml', 'hugo.dev.toml', 'postcss.config.js', 'package.json', 'themes/**', 'layouts/**') }}
path: resources/_gen/images
key: ${{ runner.os }}-hugo-images-${{ hashFiles('assets/**', 'content/**/*.jpg', 'content/**/*.jpeg', 'content/**/*.png', 'content/**/*.webp', 'content/**/*.gif', 'content/**/*.svg', 'static/**', 'themes/**/static/**', 'themes/**/assets/images/**') }}
restore-keys: |
${{ runner.os }}-hugo-build-
${{ runner.os }}-hugo-
${{ runner.os }}-hugo-images-

# Tier 3: Content and template cache (comprehensive file tracking)
# Tier 2b: Hugo asset cache (CSS/JS compilation, updates on theme/config changes)
- uses: actions/cache@v5
name: Cache Hugo content and assets
name: Cache Hugo asset compilation
with:
path: |
public
hugo_stats.json
key: ${{ runner.os }}-hugo-content-${{ hashFiles('content/**', 'data/**', 'assets/**', 'static/**', 'layouts/**', 'themes/**/*.html', 'themes/**/*.scss', 'themes/**/*.js', 'hugo.toml', 'hugo.dev.toml', 'postcss.config.js') }}
path: resources/_gen/assets
key: ${{ runner.os }}-hugo-assets-${{ hashFiles('themes/**', 'layouts/**', 'postcss.config.js', 'package.json', 'hugo.toml', 'hugo.dev.toml') }}
restore-keys: |
${{ runner.os }}-hugo-content-${{ hashFiles('content/**', 'data/**', 'assets/**', 'static/**') }}
${{ runner.os }}-hugo-content-${{ hashFiles('content/**', 'data/**') }}
${{ runner.os }}-hugo-content-
${{ runner.os }}-hugo-assets-

- name: Build with Hugo
run: |
Expand Down
Binary file modified bun.lockb
Binary file not shown.
Loading