Skip to content

Commit 4d0d7b7

Browse files
Merge pull request #30 from banana-three-join/chore/banana-three-join/workflow-update
[chore]: build and release workflow update to match makefile changes
2 parents 17fd537 + 8886322 commit 4d0d7b7

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ on:
1212
token:
1313
description: 'Bearer token'
1414
required: true
15-
academy-name:
15+
academy-name:
16+
description: 'Name of the Academy represented by this repo'
1617
required: false
17-
default: "TCS Labs Academy"
18+
default: 'TCS Labs Academy'
1819
type: string
1920
version:
2021
description: 'Module version'
@@ -27,28 +28,38 @@ jobs:
2728

2829
steps:
2930
- name: Checkout site
30-
uses: actions/checkout@v5
31+
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@v2
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 Cloud 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.PROVIDER_TOKEN }}
50-
academy-name: "TCS Labs Academy"
61+
academy-name: ${{ github.event.inputs.academy-name || 'TCS Labs 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)