From 7b4f4b4da6229e921a7092d6c1b8b493dd074405 Mon Sep 17 00:00:00 2001 From: brookee Date: Thu, 29 Feb 2024 20:00:37 -0500 Subject: [PATCH] hugo extended --- .gitea/workflows/deploy.yaml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 9bc1e67..eb6be01 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -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