Skip to content

Commit bf51231

Browse files
committed
fixup! Add GitHub Pages deployment workflow
1 parent 41b02e1 commit bf51231

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/pages.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,19 @@ jobs:
2626
with:
2727
cache: true
2828

29+
- name: Resolve docs version
30+
id: docs-version
31+
run: |
32+
git fetch origin gh-pages --depth=1 || true
33+
v=$(git ls-tree -d origin/gh-pages doc/ 2>/dev/null \
34+
| awk '{print $NF}' | sed 's|^doc/||' \
35+
| grep -E '^v?[0-9]' | sort -V | tail -1)
36+
echo "version=${v:-}" >> "$GITHUB_OUTPUT"
37+
2938
- name: Build docs
3039
env:
3140
HUGO_BASEURL: https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/
41+
HUGO_PARAMS_DOCSVERSION: ${{ steps.docs-version.outputs.version }}
3242
run: mise run build-docs
3343

3444
- name: Push rendered site to gh-pages

0 commit comments

Comments
 (0)