|
8 | 8 | runs-on: ubuntu-24.04-4core |
9 | 9 | steps: |
10 | 10 | - name: Check out code |
11 | | - uses: actions/checkout@v3 |
| 11 | + uses: actions/checkout@v4 |
| 12 | + |
12 | 13 | - name: Editor config |
13 | 14 | uses: snow-actions/[email protected] |
14 | 15 | continue-on-error: true |
| 16 | + |
15 | 17 | - name: Set up Go |
16 | | - uses: actions/setup-go@v3 |
| 18 | + uses: actions/setup-go@v5 |
17 | 19 | with: |
18 | | - go-version: "~1.23" |
| 20 | + go-version-file: go.mod |
| 21 | + |
19 | 22 | - name: Get Go module cache directory path |
20 | 23 | 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 | + |
22 | 26 | - name: Initialize Go module cache |
23 | | - uses: actions/cache@v3 |
| 27 | + uses: actions/cache@v4 |
24 | 28 | with: |
25 | 29 | path: ${{ steps.go-module-cache-dir-path.outputs.dir }} |
26 | 30 | key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} |
27 | 31 | restore-keys: | |
28 | 32 | ${{ runner.os }}-go- |
| 33 | +
|
29 | 34 | - name: Download Go dependencies |
30 | 35 | run: make go.deps |
| 36 | + |
31 | 37 | - name: Set up Node |
32 | | - uses: actions/setup-node@v3 |
| 38 | + uses: actions/setup-node@v4 |
33 | 39 | with: |
34 | | - node-version: "~16" |
| 40 | + node-version: "~20" |
| 41 | + |
35 | 42 | - name: Get Yarn cache directory path |
36 | 43 | 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 | + |
38 | 46 | - name: Initialize Yarn module cache |
39 | | - uses: actions/cache@v3 |
| 47 | + uses: actions/cache@v4 |
40 | 48 | with: |
41 | 49 | path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
42 | 50 | key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} |
43 | 51 | restore-keys: | |
44 | 52 | ${{ runner.os }}-yarn- |
| 53 | +
|
45 | 54 | - name: Download Yarn dependencies |
46 | 55 | run: make js.deps |
| 56 | + |
47 | 57 | - name: Initialize Hugo binary cache |
48 | 58 | id: cache-hugo |
49 | | - uses: actions/cache@v3 |
| 59 | + uses: actions/cache@v4 |
50 | 60 | with: |
51 | 61 | path: hugo.linux |
52 | 62 | key: ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum') }} |
53 | 63 | restore-keys: | |
54 | 64 | ${{ runner.os }}-hugo- |
| 65 | +
|
55 | 66 | - name: Build Hugo binary |
56 | 67 | if: steps.cache-hugo.outputs.cache-hit != 'true' |
57 | 68 | run: make hugo.linux |
| 69 | + |
58 | 70 | - name: Build docs |
59 | 71 | run: make build.public |
60 | 72 | env: |
|
68 | 80 | HUGO_PARAMS_SEARCH_APIKEY: ${{ secrets.HUGO_PARAMS_SEARCH_APIKEY }} |
69 | 81 | HUGO_PARAMS_SEARCH_ENABLED: true |
70 | 82 | 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