Skip to content

Commit 451deca

Browse files
[chore]: add go setup and remove hugo from workflow in preference for the hugo from node modules
Signed-off-by: Lenox Wiltshire <lenoxwiltshire@gmail.com>
1 parent 0298c4e commit 451deca

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

.github/workflows/build-and-release.yml

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ on:
1515
academy-name:
1616
description: 'Name of the Academy represented by this repo'
1717
required: false
18-
default: 'Academy'
18+
default: 'Academy'
19+
type: string
1920
version:
2021
description: 'Module version'
2122
required: false
@@ -28,27 +29,37 @@ jobs:
2829
steps:
2930
- name: Checkout site
3031
uses: actions/checkout@v6
32+
with:
33+
fetch-depth: 0
34+
35+
# Required: academy-theme is a Hugo module, so the build needs Go.
36+
# 'make build-production' runs check-go and fails fast without it.
37+
- name: Setup Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version-file: go.mod
41+
cache: true
3142

32-
- name: Setup Hugo Extended
33-
uses: peaceiris/actions-hugo@v3
43+
- name: Setup Node
44+
uses: actions/setup-node@v4
3445
with:
35-
hugo-version: '0.158.0'
36-
extended: true
46+
node-version: '20'
47+
cache: 'npm'
3748

3849
- name: Install dependencies
3950
run: make setup
4051

4152
- name: Run production build test
42-
run: make build
53+
run: make build-production
4354

4455
- name: Publish to layer5 academy
4556
id: academy
4657
uses: layer5io/academy-build@v0.1.6
4758
with:
4859
orgId: ${{ github.event.inputs.orgId || secrets.ACADEMY_ORG_ID }}
4960
token: ${{ github.event.inputs.token || secrets.ACADEMY_TOKEN }}
50-
academy-name: 'Academy'
61+
academy-name: ${{ github.event.inputs.academy-name || 'Academy' }}
5162
version: ${{ github.event.inputs.version != '' && github.event.inputs.version || github.ref_name }}
5263

5364
- name: Show response
54-
run: echo "${{ steps.academy.outputs.response }}"
65+
run: echo "${{ steps.academy.outputs.response }}"

0 commit comments

Comments
 (0)