hugo extended
All checks were successful
Hugo / build (push) Successful in 19s

This commit is contained in:
brookee 2024-02-29 20:00:37 -05:00
parent e4d06f4b49
commit 7b4f4b4da6

View file

@ -16,17 +16,12 @@ jobs:
- name: Grab packages
run: |
apt-get update && \
apt-get install -y jq rsync tar wget
- name: Get latest Hugo version
run: |
url=$(curl --silent "https://api.github.com/repos/gohugoio/hugo/releases/latest" | jq -r '.assets[] | select(.name | contains("linux-amd64.tar.gz")) | .browser_download_url' | grep -E 'hugo_[0-9]+\.[0-9]+\.[0-9]+_linux-amd64.tar.gz')
wget -P /tmp/hugo/ "$url"
version=$(echo "$url" | grep -oP 'hugo_\K[0-9]+\.[0-9]+\.[0-9]+')
echo "Downloaded Hugo version: $version"
- name: Unpack Hugo
run: tar -xf /tmp/hugo/* -C ${{ gitea.workspace }}/bin
- name: Build the static webpage
run: ${{ gitea.workspace }}/bin/hugo --minify
apt-get install -y jq rsync tar wget && \
wget https://github.com/gohugoio/hugo/releases/download/v0.123.6/hugo_extended_0.123.6_linux-amd64.tar.gz && \
tar -xzvf hugo_extended_0.123.6_linux-amd64.tar.gz && \
chmod +x hugo
- name: Run build task
run: ./hugo --minify --logLevel info
- name: Test static page
run: bash ${{ gitea.workspace }}/bin/test_static_page.sh
- name: Deploy to Server