Skip to content

Commit

Permalink
Merge pull request #19 from victoriadrake/18/robustify-getting-latest…
Browse files Browse the repository at this point in the history
…-hugo

Update action.sh
  • Loading branch information
victoriadrake authored Oct 8, 2023
2 parents 601eea4 + 2f06a20 commit fc2efea
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions action.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ echo '🔧 Install tools'
npm init -y && npm install -y postcss postcss-cli autoprefixer

echo '🤵 Install Hugo'
HUGO_VERSION=$(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | jq -r '.tag_name')
mkdir tmp/ && cd tmp/
curl -sSL https://github.com/gohugoio/hugo/releases/download/${HUGO_VERSION}/hugo_extended_${HUGO_VERSION: -7}_Linux-64bit.tar.gz | tar -xvzf-
mv hugo /usr/local/bin/
curl -sSL $(curl -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*\hugo_extended.*\_Linux-64bit.tar.gz" | rev | cut -d ' ' -f 1 | rev | tr -d '"') | tar -xvzf-
sudo mv hugo /usr/local/bin/
cd .. && rm -rf tmp/
cd ${GITHUB_WORKSPACE}
hugo version || exit 1
Expand Down

0 comments on commit fc2efea

Please sign in to comment.