Skip to content

Commit 02db9ec

Browse files
author
Splitter
committed
starters: upgrade GitHub actions
1 parent 84db3e7 commit 02db9ec

File tree

4 files changed

+37
-37
lines changed

4 files changed

+37
-37
lines changed

.github/workflows/publish.yaml

+34-34
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Deploy website to GitHub Pages
22

33
env:
4-
WC_HUGO_VERSION: '0.123.7'
4+
WC_HUGO_VERSION: '0.124.1'
55

66
on:
77
# Trigger the workflow every time you push to the `main` branch
@@ -26,37 +26,37 @@ jobs:
2626
if: github.repository_owner != 'HugoBlox'
2727
runs-on: ubuntu-latest
2828
steps:
29-
- name: Checkout
30-
uses: actions/checkout@v4
31-
with:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
3232
# Fetch history for Hugo's .GitInfo and .Lastmod
33-
fetch-depth: 0
34-
- name: Setup Hugo
35-
uses: peaceiris/actions-hugo@v2
36-
with:
37-
hugo-version: ${{ env.WC_HUGO_VERSION }}
38-
extended: true
39-
- uses: actions/cache@v3
40-
with:
41-
path: /tmp/hugo_cache_runner/
42-
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
43-
restore-keys: |
44-
${{ runner.os }}-hugomod-
45-
- name: Setup Pages
46-
id: pages
47-
uses: actions/configure-pages@v3
48-
- name: Build with Hugo
49-
env:
50-
HUGO_ENVIRONMENT: production
51-
run: |
52-
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
53-
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
54-
- name: Generate Pagefind search index
55-
run: npx pagefind --source "public"
56-
- name: Upload artifact
57-
uses: actions/upload-pages-artifact@v2
58-
with:
59-
path: ./public
33+
fetch-depth: 0
34+
- name: Setup Hugo
35+
uses: peaceiris/actions-hugo@v3
36+
with:
37+
hugo-version: ${{ env.WC_HUGO_VERSION }}
38+
extended: true
39+
- uses: actions/cache@v4
40+
with:
41+
path: /tmp/hugo_cache_runner/
42+
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.mod') }}
43+
restore-keys: |
44+
${{ runner.os }}-hugomod-
45+
- name: Setup Pages
46+
id: pages
47+
uses: actions/configure-pages@v5
48+
- name: Build with Hugo
49+
env:
50+
HUGO_ENVIRONMENT: production
51+
run: |
52+
echo "Hugo Cache Dir: $(hugo config | grep cachedir)"
53+
hugo --minify --baseURL "${{ steps.pages.outputs.base_url }}/"
54+
- name: Generate Pagefind search index
55+
run: npx pagefind --source "public"
56+
- name: Upload artifact
57+
uses: actions/upload-pages-artifact@v3
58+
with:
59+
path: ./public
6060

6161
# Deploy website to GitHub Pages hosting
6262
deploy:
@@ -67,6 +67,6 @@ jobs:
6767
runs-on: ubuntu-latest
6868
needs: build
6969
steps:
70-
- name: Deploy to GitHub Pages
71-
id: deployment
72-
uses: actions/deploy-pages@v2
70+
- name: Deploy to GitHub Pages
71+
id: deployment
72+
uses: actions/deploy-pages@v4

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ go 1.15
44

55
require (
66
github.com/HugoBlox/hugo-blox-builder/modules/blox-plugin-netlify v1.1.2-0.20240217212918-ae7f0c597978
7-
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240303165809-469a458ab94f
7+
github.com/HugoBlox/hugo-blox-builder/modules/blox-tailwind v0.2.1-0.20240310162319-c03355fea540
88
)

hugoblox.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
build:
2-
hugo_version: '0.123.7'
2+
hugo_version: '0.124.1'

netlify.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
publish = "public"
44

55
[build.environment]
6-
HUGO_VERSION = "0.123.7"
6+
HUGO_VERSION = "0.124.1"
77
HUGO_ENABLEGITINFO = "true"
88

99
[context.production.environment]

0 commit comments

Comments
 (0)