Skip to content

Commit 451aa12

Browse files
author
Splitter
committed
fix(tpl): resolve broken assets on GitHub Pages subdirectory deployments
1 parent 30036b9 commit 451aa12

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
artifact-id: ${{ steps.upload.outputs.artifact-id }}
3535
steps:
3636
- name: Checkout
37-
uses: actions/checkout@v4
37+
uses: actions/checkout@v6
3838
with:
3939
# Fetch history for Hugo's .GitInfo and .Lastmod
4040
fetch-depth: 0
@@ -92,7 +92,7 @@ jobs:
9292
extended: true
9393

9494
# Cache dependencies (Go modules, node_modules) - stable, rarely changes
95-
- uses: actions/cache@v4
95+
- uses: actions/cache@v5
9696
with:
9797
path: |
9898
/tmp/hugo_cache_runner/
@@ -104,21 +104,25 @@ jobs:
104104
${{ runner.os }}-hugo-deps-
105105
106106
# Cache Hugo resources (processed images, CSS) - invalidates only when assets/config change
107-
- uses: actions/cache@v4
107+
- uses: actions/cache@v5
108108
with:
109109
path: resources/
110110
key: ${{ runner.os }}-hugo-resources-${{ hashFiles('assets/**/*', 'config/**/*',
111111
'hugo.yaml', 'package.json') }}
112112
restore-keys: |
113113
${{ runner.os }}-hugo-resources-
114114
115+
- name: Setup Pages
116+
id: pages
117+
uses: actions/configure-pages@v5
118+
115119
- name: Build with Hugo
116120
env:
117121
HUGO_ENVIRONMENT: production
118122
HUGO_BLOX_LICENSE: ${{ secrets.HUGO_BLOX_LICENSE }}
119123
run: |
120124
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
121-
hugo --minify
125+
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
122126
123127
- name: Generate Pagefind search index (if applicable)
124128
run: |

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
deploy-host: ${{ steps.check.outputs.host }}
2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030
with:
3131
sparse-checkout: hugoblox.yaml
3232
sparse-checkout-cone-mode: false

.github/workflows/upgrade.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
timeout-minutes: 15
3333
steps:
3434
- name: Checkout
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v6
3636
with:
3737
fetch-depth: 0
3838

@@ -48,7 +48,7 @@ jobs:
4848
run_install: false
4949

5050
- name: Setup Go
51-
uses: actions/setup-go@v5
51+
uses: actions/setup-go@v6
5252
with:
5353
go-version: '1.23'
5454

@@ -75,7 +75,7 @@ jobs:
7575
7676
7777
- name: Create Pull Request
78-
uses: peter-evans/create-pull-request@v6
78+
uses: peter-evans/create-pull-request@v7
7979
with:
8080
token: ${{ secrets.GITHUB_TOKEN }}
8181
commit-message: "chore(deps): upgrade hugoblox modules"

0 commit comments

Comments
 (0)