Skip to content

Commit da66de1

Browse files
author
Splitter
committed
fix(tpl): resolve broken assets on GitHub Pages subdirectory deployments
1 parent 5ef8ae6 commit da66de1

4 files changed

Lines changed: 16 additions & 12 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/import-publications.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ jobs:
3131
PYTHON_VERSION: '3.13'
3232
steps:
3333
- name: Checkout the repo
34-
uses: actions/checkout@v4
34+
uses: actions/checkout@v6
3535
with:
3636
# Only need recent history for publication import
3737
fetch-depth: 1
3838

3939
- name: Set up Python 3.13
40-
uses: actions/setup-python@v5
40+
uses: actions/setup-python@v6
4141
with:
4242
python-version: '3.13'
4343
- name: Setup pip cache
44-
uses: actions/cache@v4
44+
uses: actions/cache@v5
4545
with:
4646
path: ~/.cache/pip
4747
key: ${{ runner.os }}-pip-academic-${{ env.ACADEMIC_VERSION }}
@@ -81,7 +81,7 @@ jobs:
8181
- name: Create Pull Request
8282
# Set ID for `Check outputs` stage
8383
id: cpr
84-
uses: peter-evans/create-pull-request@v6
84+
uses: peter-evans/create-pull-request@v7
8585
with:
8686
commit-message: 'feat(publications): import latest publications from bibtex'
8787
title: 'HugoBlox Kit - Import latest publications from Bibtex'

.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)