Skip to content

Commit 9117de3

Browse files
committed
Introduce .env file for single point of Hugo version
1 parent 51467c2 commit 9117de3

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HUGO_VERSION=0.142.0

.github/workflows/hugo.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,20 @@ jobs:
3131
# Build job
3232
build:
3333
runs-on: ubuntu-latest
34-
env:
35-
HUGO_VERSION: 0.142.0
3634
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
fetch-depth: 0
40+
- name: Load Hugo version
41+
run: echo "HUGO_VERSION=$(grep '^HUGO_VERSION=' .env | cut -d'=' -f2)" >> $GITHUB_ENV
3742
- name: Install Hugo CLI
3843
run: |
3944
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
4045
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
4146
- name: Install Dart Sass
4247
run: sudo snap install dart-sass
43-
- name: Checkout
44-
uses: actions/checkout@v4
45-
with:
46-
submodules: recursive
47-
fetch-depth: 0
4848
- name: Setup Pages
4949
id: pages
5050
uses: actions/configure-pages@v5

0 commit comments

Comments
 (0)