Workflow: Use package manager hugo
Build and deploy site / deploy (push) Failing after 9s Details

This commit is contained in:
Jarrod Doyle 2024-03-16 11:42:21 +00:00
parent 5b56659821
commit ec4ac4dcb2
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
1 changed files with 2 additions and 13 deletions

View File

@ -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