Skip to content

Commit fd77f07

Browse files
committed
docs(pages): switch to relative URLs
This change allows us to upload the pages artifact during a CI run. The artifact can then be downloaded to preview the pages locally, with CI serving as the 'ultimate source of truth'. Signed-off-by: Michael Adler <michael.adler@siemens.com>
1 parent 2ed7881 commit fd77f07

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/pages.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,17 @@ jobs:
3232
continue-on-error: true
3333
- run: cd hugo && npm ci
3434
- run: just pages
35-
env:
36-
HUGO_BASEURL: ${{ vars.HUGO_BASEURL }}
3735
- run: find public
3836
- name: Deploy
3937
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
4038
if: ${{ github.ref == 'refs/heads/main' }}
4139
with:
4240
github_token: ${{ secrets.GITHUB_TOKEN }}
4341
publish_dir: ./public
42+
- name: Upload pages
43+
uses: actions/upload-artifact@v4
44+
if: ${{ github.ref != 'refs/heads/main' }}
45+
with:
46+
name: wfx-pages
47+
path: public
48+
retention-days: 5

hugo/config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ contentDir = "content"
66
defaultContentLanguage = "en"
77
defaultContentLanguageInSubdir = false
88

9+
relativeURLs = true
10+
911
[languages]
1012
[languages.en]
1113
languageName ="English"

hugo/content/_index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<div class="mx-auto">
99
<img src="./images/logo.svg" alt="wfx logo" />
1010
<br /><br /><br />
11-
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "/docs" >}}">
11+
<a class="btn btn-lg btn-primary mr-3 mb-4" href="{{< relref "./docs" >}}">
1212
Learn More <i class="fas fa-arrow-alt-circle-right ml-2"></i>
1313
</a>
1414
<a

0 commit comments

Comments
 (0)