Skip to content

Commit f444920

Browse files
committed
util: Update pull request action
1 parent e6a7b75 commit f444920

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

.github/workflows/pull_request.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,53 +8,65 @@ jobs:
88
runs-on: ubuntu-24.04-4core
99
steps:
1010
- name: Check out code
11-
uses: actions/checkout@v3
11+
uses: actions/checkout@v4
12+
1213
- name: Editor config
1314
uses: snow-actions/[email protected]
1415
continue-on-error: true
16+
1517
- name: Set up Go
16-
uses: actions/setup-go@v3
18+
uses: actions/setup-go@v5
1719
with:
18-
go-version: "~1.23"
20+
go-version-file: go.mod
21+
1922
- name: Get Go module cache directory path
2023
id: go-module-cache-dir-path
21-
run: echo "::set-output name=dir::$(go env GOMODCACHE)"
24+
run: echo "dir=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
25+
2226
- name: Initialize Go module cache
23-
uses: actions/cache@v3
27+
uses: actions/cache@v4
2428
with:
2529
path: ${{ steps.go-module-cache-dir-path.outputs.dir }}
2630
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2731
restore-keys: |
2832
${{ runner.os }}-go-
33+
2934
- name: Download Go dependencies
3035
run: make go.deps
36+
3137
- name: Set up Node
32-
uses: actions/setup-node@v3
38+
uses: actions/setup-node@v4
3339
with:
34-
node-version: "~16"
40+
node-version: "~20"
41+
3542
- name: Get Yarn cache directory path
3643
id: yarn-cache-dir-path
37-
run: echo "::set-output name=dir::$(npx yarn cache dir)"
44+
run: echo "dir=$(npx yarn cache dir)" >> $GITHUB_OUTPUT
45+
3846
- name: Initialize Yarn module cache
39-
uses: actions/cache@v3
47+
uses: actions/cache@v4
4048
with:
4149
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
4250
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
4351
restore-keys: |
4452
${{ runner.os }}-yarn-
53+
4554
- name: Download Yarn dependencies
4655
run: make js.deps
56+
4757
- name: Initialize Hugo binary cache
4858
id: cache-hugo
49-
uses: actions/cache@v3
59+
uses: actions/cache@v4
5060
with:
5161
path: hugo.linux
5262
key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum') }}
5363
restore-keys: |
5464
${{ runner.os }}-hugo-
65+
5566
- name: Build Hugo binary
5667
if: steps.cache-hugo.outputs.cache-hit != 'true'
5768
run: make hugo.linux
69+
5870
- name: Build docs
5971
run: make build.public
6072
env:
@@ -68,3 +80,10 @@ jobs:
6880
HUGO_PARAMS_SEARCH_APIKEY: ${{ secrets.HUGO_PARAMS_SEARCH_APIKEY }}
6981
HUGO_PARAMS_SEARCH_ENABLED: true
7082
HUGO_PARAMS_SEARCH_INDEX: thethingsstack
83+
84+
- name: Validate build output
85+
run: |
86+
if [ ! -d "public" ]; then
87+
echo "Error: Build output directory 'public' not found"
88+
exit 1
89+
fi

0 commit comments

Comments
 (0)