2023-06-16 03:04:22 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-10-31 19:10:42 -04:00
|
|
|
#curl -L -s https://api.github.com/repos/gohugoio/hugo/releases/latest | grep "browser_download_url.*extended.*linux-amd64.tar.gz" | cut -d : -f 2,3 | sed 's/"//g' | xargs wget
|
|
|
|
|
|
|
|
wget https://github.com/gohugoio/hugo/releases/download/v0.119.0/hugo_0.119.0_Linux-64bit.tar.gz
|
2023-06-16 08:15:09 -04:00
|
|
|
|
2023-06-16 09:16:35 -04:00
|
|
|
tar xvf ./*.tar.gz
|
2023-06-16 09:02:43 -04:00
|
|
|
chmod u+x ./hugo
|
2023-06-16 07:54:15 -04:00
|
|
|
|
2023-06-16 03:09:41 -04:00
|
|
|
if [ "$CF_PAGES_BRANCH" == "main" ]; then
|
2023-06-16 09:02:43 -04:00
|
|
|
./hugo --minify
|
2023-06-16 03:04:22 -04:00
|
|
|
else
|
2023-06-25 10:16:07 -04:00
|
|
|
./hugo -b "$CF_PAGES_URL"
|
2023-06-16 03:04:22 -04:00
|
|
|
fi
|