From 67f02cdc8520aa9625118eebedfb70255894c887 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 11 Apr 2026 14:14:10 +0530 Subject: [PATCH] Update Hugo version default to latest in gh-pages workflow --- .github/workflows/gh-pages.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index c36e6cef..8378a371 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -15,7 +15,7 @@ on: hugoVersion: description: "Hugo Version" required: false - default: "0.146.0" + default: "latest" # Allow one concurrent deployment concurrency: @@ -34,8 +34,14 @@ jobs: contents: read runs-on: ubuntu-latest env: - HUGO_VERSION: ${{ github.event.inputs.hugoVersion || '0.146.0' }} + HUGO_VERSION: ${{ github.event.inputs.hugoVersion || 'latest' }} steps: + - name: Resolve Hugo version + run: | + if [ "${HUGO_VERSION}" = "latest" ]; then + HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name"' | sed 's/.*"v\([^"]*\)".*/\1/') + echo "HUGO_VERSION=${HUGO_VERSION}" >> $GITHUB_ENV + fi - name: Install Hugo CLI run: | wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-amd64.deb \