55 branches :
66 - master
77
8+ permissions :
9+ contents : read # Read access for checkout
10+ pages : write # Write access to deploy to GitHub Pages
11+
812jobs :
913 release :
1014 name : Release docs
1115 runs-on : ubuntu-24.04-4core
16+ timeout-minutes : 10
1217 steps :
1318 - name : Check out code
14- uses : actions/checkout@v3
19+ uses : actions/checkout@v4
1520 with :
1621 fetch-depth : 0
22+
1723 - name : Set up Go
18- uses : actions/setup-go@v3
24+ uses : actions/setup-go@v5
1925 with :
20- go-version : " ~1.23"
26+ go-version-file : go.mod
27+
2128 - name : Get Go module cache directory path
2229 id : go-module-cache-dir-path
23- run : echo "::set-output name=dir::$(go env GOMODCACHE)"
30+ run : echo "dir=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
31+
2432 - name : Initialize Go module cache
25- uses : actions/cache@v3
33+ uses : actions/cache@v4
2634 with :
2735 path : ${{ steps.go-module-cache-dir-path.outputs.dir }}
2836 key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
2937 restore-keys : |
3038 ${{ runner.os }}-go-
39+
3140 - name : Download Go dependencies
3241 run : make go.deps
42+
3343 - name : Set up Node
34- uses : actions/setup-node@v3
44+ uses : actions/setup-node@v4
3545 with :
36- node-version : " ~16"
46+ node-version : " ~20"
47+
3748 - name : Get Yarn cache directory path
3849 id : yarn-cache-dir-path
39- run : echo "::set-output name=dir::$(npx yarn cache dir)"
50+ run : echo "dir=$(npx yarn cache dir)" >> $GITHUB_OUTPUT
51+
4052 - name : Initialize Yarn module cache
41- uses : actions/cache@v3
53+ uses : actions/cache@v4
4254 with :
4355 path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
4456 key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
4557 restore-keys : |
4658 ${{ runner.os }}-yarn-
59+
4760 - name : Download Yarn dependencies
4861 run : make js.deps
62+
4963 - name : Initialize Hugo binary cache
5064 id : cache-hugo
51- uses : actions/cache@v3
65+ uses : actions/cache@v4
5266 with :
5367 path : hugo.linux
5468 key : ${{ runner.os }}-hugo-${{ hashFiles('**/go.sum') }}
5569 restore-keys : |
5670 ${{ runner.os }}-hugo-
71+
5772 - name : Build Hugo binary
5873 if : steps.cache-hugo.outputs.cache-hit != 'true'
5974 run : make hugo.linux
75+
6076 - name : Build docs
6177 run : make build.public
6278 env :
@@ -71,14 +87,35 @@ jobs:
7187 HUGO_PARAMS_SEARCH_APIKEY : ${{ secrets.HUGO_PARAMS_SEARCH_APIKEY }}
7288 HUGO_PARAMS_SEARCH_ENABLED : true
7389 HUGO_PARAMS_SEARCH_INDEX : thethingsstack
90+
91+ - name : Validate build output
92+ run : |
93+ if [ ! -d "public" ]; then
94+ echo "Error: Build output directory 'public' not found"
95+ exit 1
96+ fi
97+
7498 - name : Deploy documentation to Github pages
75- uses : JamesIves/github-pages-deploy-action@releases/ v4
99+ uses : JamesIves/github-pages-deploy-action@v4
76100 with :
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78- BRANCH : gh-pages
79- FOLDER : public
101+ token : ${{ secrets.GITHUB_TOKEN }}
102+ branch : gh-pages
103+ folder : public
104+
80105 - name : Make gateways.csv
81106 run : make gateways.csv
107+ continue-on-error : true
108+
82109 - name : Sync gateways.csv to airtable
110+ if : success() || failure()
83111 run : |
84- curl -X POST ${{ secrets.AIRTABLE_GATEWAYS_API_ENDPOINT }} -H "Authorization: Bearer ${{ secrets.AIRTABLE_GATEWAYS_API_KEY }}" -H "Content-Type: text/csv" --data-binary "@gateways.csv"
112+ if [ ! -f gateways.csv ]; then
113+ echo "Warning: gateways.csv not found, skipping sync"
114+ exit 0
115+ fi
116+ curl -f -X POST ${{ secrets.AIRTABLE_GATEWAYS_API_ENDPOINT }} \
117+ -H "Authorization: Bearer ${{ secrets.AIRTABLE_GATEWAYS_API_KEY }}" \
118+ -H "Content-Type: text/csv" \
119+ --data-binary "@gateways.csv" \
120+ --fail-with-body
121+ continue-on-error : true
0 commit comments