33 push :
44 branches :
55 - gh-pages
6+
67 workflow_dispatch :
8+
9+ workflow_call :
10+
11+ # When coverage data is collected and pushed to gh-pages branch
12+ workflow_run :
13+ workflows :
14+ - coverage
15+ types :
16+ - completed
17+
718permissions :
819 contents : read
920 pages : write
1021 id-token : write
22+
1123concurrency :
1224 group : pages
1325 cancel-in-progress : false
26+
1427defaults :
1528 run :
1629 shell : bash
30+
1731jobs :
1832 build :
1933 runs-on : ubuntu-latest
@@ -23,53 +37,64 @@ jobs:
2337 HUGO_VERSION : 0.156.0
2438 NODE_VERSION : 24.13.1
2539 TZ : Europe/Oslo
40+
2641 steps :
2742 - name : Checkout
2843 uses : actions/checkout@v6
2944 with :
3045 ref : gh-pages
3146 submodules : recursive
3247 fetch-depth : 0
48+
3349 - name : Setup Go
3450 uses : actions/setup-go@v6
3551 with :
3652 go-version : ${{ env.GO_VERSION }}
3753 cache : false
54+
3855 - name : Setup Node.js
3956 uses : actions/setup-node@v6
4057 with :
4158 node-version : ${{ env.NODE_VERSION }}
59+
4260 - name : Setup Pages
4361 id : pages
44- uses : actions/configure-pages@v5
62+ uses : actions/configure-pages@v6.0.0
63+
4564 - name : Create directory for user-specific executable files
4665 run : |
4766 mkdir -p "${HOME}/.local"
67+
4868 - name : Install Dart Sass
4969 run : |
5070 curl -sLJO "https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
5171 tar -C "${HOME}/.local" -xf "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
5272 rm "dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz"
5373 echo "${HOME}/.local/dart-sass" >> "${GITHUB_PATH}"
74+
5475 - name : Install Hugo
5576 run : |
5677 curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
5778 mkdir "${HOME}/.local/hugo"
5879 tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
5980 rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz"
6081 echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}"
82+
6183 - name : Verify installations
6284 run : |
6385 echo "Dart Sass: $(sass --version)"
6486 echo "Go: $(go version)"
6587 echo "Hugo: $(hugo version)"
6688 echo "Node.js: $(node --version)"
89+
6790 - name : Install Node.js dependencies
6891 run : |
6992 [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true
93+
7094 - name : Configure Git
7195 run : |
7296 git config core.quotepath false
97+
7398 - name : Cache restore
7499 id : cache-restore
75100 uses : actions/cache/restore@v5
@@ -78,31 +103,35 @@ jobs:
78103 key : hugo-${{ github.run_id }}
79104 restore-keys :
80105 hugo-
106+
81107 - name : Build the site
82108 run : |
83- cd hugo- docs
109+ cd docs
84110 hugo build \
85111 --gc \
86112 --minify \
87113 --baseURL "${{ steps.pages.outputs.base_url }}/" \
88114 --cacheDir "${{ runner.temp }}/hugo_cache"
115+
89116 - name : Cache save
90117 id : cache-save
91118 uses : actions/cache/save@v5
92119 with :
93120 path : ${{ runner.temp }}/hugo_cache
94121 key : ${{ steps.cache-restore.outputs.cache-primary-key }}
122+
95123 - name : Upload artifact
96- uses : actions/upload-pages-artifact@v3
124+ uses : actions/upload-pages-artifact@v5
97125 with :
98- path : ./hugo-docs/public
126+ path : ./docs/public
127+
99128 deploy :
129+ runs-on : ubuntu-latest
130+ needs : build
100131 environment :
101132 name : github-pages
102133 url : ${{ steps.deployment.outputs.page_url }}
103- runs-on : ubuntu-latest
104- needs : build
105134 steps :
106135 - name : Deploy to GitHub Pages
107136 id : deployment
108- uses : actions/deploy-pages@v4
137+ uses : actions/deploy-pages@v5
0 commit comments