We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a403576 commit dcb5bb1Copy full SHA for dcb5bb1
1 file changed
.github/workflows/deploy.yml
@@ -28,7 +28,10 @@ jobs:
28
29
- name: Setup Hugo
30
run: |
31
- curl -L -o /tmp/hugo.tar.gz 'https://github.com/gohugoio/hugo/releases/download/v0.161.1/hugo_extended_0.161.1_linux-amd64.tar.gz'
+ LATEST_TAG=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
32
+ VERSION=${LATEST_TAG#v}
33
+ echo "Using Hugo release $LATEST_TAG (version $VERSION)"
34
+ curl -L -o /tmp/hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/${LATEST_TAG}/hugo_extended_${VERSION}_linux-amd64.tar.gz"
35
tar -C ${RUNNER_TEMP} -zxvf /tmp/hugo.tar.gz hugo
36
- name: Build
37
run: ${RUNNER_TEMP}/hugo
0 commit comments