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 - name: Grab packages
run: | run: |
apt-get update && \ apt-get update && \
apt-get install -y jq rsync tar wget apt-get install -y jq rsync tar wget && \
- name: Get latest Hugo version wget https://github.com/gohugoio/hugo/releases/download/v0.123.6/hugo_extended_0.123.6_linux-amd64.tar.gz && \
run: | tar -xzvf hugo_extended_0.123.6_linux-amd64.tar.gz && \
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') chmod +x hugo
wget -P /tmp/hugo/ "$url" - name: Run build task
version=$(echo "$url" | grep -oP 'hugo_\K[0-9]+\.[0-9]+\.[0-9]+') run: ./hugo --minify --logLevel info
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
- name: Test static page - name: Test static page
run: bash ${{ gitea.workspace }}/bin/test_static_page.sh run: bash ${{ gitea.workspace }}/bin/test_static_page.sh
- name: Deploy to Server - name: Deploy to Server