Skip to content

Commit 6bb19a1

Browse files
committed
[CICD] Updated Hugo workflow
1 parent b34af97 commit 6bb19a1

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

.github/workflows/pages.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,29 @@ jobs:
3434
steps:
3535
- name: Install Hugo CLI
3636
run: |
37-
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.deb \
37+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
3838
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
39+
- name: Install Dart Sass
40+
run: sudo snap install dart-sass
3941
- name: Checkout
40-
uses: actions/checkout@v3
42+
uses: actions/checkout@v4
4143
with:
4244
submodules: recursive
4345
- name: Setup Pages
4446
id: pages
45-
uses: actions/configure-pages@v1
47+
uses: actions/configure-pages@v5
4648
- name: Install dependencies
4749
run: npm install
50+
- name: Install Node.js dependencies
51+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
4852
- name: Build with Hugo
53+
env:
54+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
55+
HUGO_ENVIRONMENT: production
4956
run: |
5057
hugo \
51-
--minify --gc --minify \
52-
--baseURL ${{ steps.pages.outputs.base_url }}
58+
--gc --minify \
59+
--baseURL "${{ steps.pages.outputs.base_url }}"
5360
- name: Upload artifact
5461
uses: actions/upload-pages-artifact@v1
5562
with:

0 commit comments

Comments
 (0)