Skip to content

Commit 4ddb3c8

Browse files
committed
Fetch hugo version from .tool-versions
1 parent 0f404b1 commit 4ddb3c8

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,21 @@ jobs:
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v4
24+
25+
- name: Setup Hugo Version
26+
id: hugo_version
27+
run: |
28+
echo "HUGO_VERSION=$(cat .tool-versions | grep hugo | cut -d' ' -f2 | cut -d'_' -f2)" >> "$GITHUB_ENV"
29+
2430
- name: Setup Hugo
2531
uses: peaceiris/actions-hugo@v3
2632
with:
27-
hugo-version: "0.139.4"
33+
hugo-version: ${{ vars.HUGO_VERSION }}
2834
extended: true
35+
2936
- name: Build
3037
run: make -C community.hachyderm.io hugo
38+
3139
- name: Upload artifact
3240
uses: actions/upload-pages-artifact@v3
3341
with:

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
hugo extended_0.139.4
2+
node 22

0 commit comments

Comments
 (0)