From ec4ac4dcb22caf00766cb05028901c8353fb36e1 Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sat, 16 Mar 2024 11:42:21 +0000 Subject: [PATCH] Workflow: Use package manager hugo --- .gitea/workflows/build_and_deploy.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/build_and_deploy.yaml b/.gitea/workflows/build_and_deploy.yaml index e7d860e..9f9fc85 100644 --- a/.gitea/workflows/build_and_deploy.yaml +++ b/.gitea/workflows/build_and_deploy.yaml @@ -17,20 +17,9 @@ jobs: with: submodules: 'recursive' - name: Install apt packages - run: apt update && apt install -y jq rsync - - 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: | - mkdir -p ${{ gitea.workspace }}/bin - tar -xf /tmp/hugo/* -C ${{ gitea.workspace }}/bin - chmod 700 ${{ gitea.workspace }}/bin/hugo + run: apt update && apt install -y jq rsync hugo - name: Build the static webpage - run: ${{ gitea.workspace }}/bin/hugo --minify + run: hugo --minify - name: Create private key run: | echo "${{ secrets.ACT_RUNNER_KEY }}" > /tmp/act_runner_key