peaceiris / actions-hugo

GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported.
https://github.com/marketplace/actions/hugo-setup
MIT License
1.44k stars 85 forks source link

support: seems not working on macOS: Error: Action failed with error Unexpected HTTP response: 404 #652

Open razonyang opened 3 months ago

razonyang commented 3 months ago

Checklist

Describe your question

Hi, I encountered an issue using this action on macos-latest runner, but not working.

image

Relevant links

Public repository:
YAML config:
YAML workflow:

name: GitHub Pages

on:
  push:
    branches:
      - main  # Set a branch to deploy
  pull_request:

jobs:
  build:
    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
        version: ['0.123.0', '0.124.0', '0.125.0', '0.126.0', '0.127.0', '0.128.0', '0.131.0', '0.132.0']
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: ${{ matrix.version }}
          extended: true

      - name: Build
        run: hugo

Relevant log output

Run peaceiris/actions-hugo@v3
  with:
    hugo-version: 0.1[2](https://github.com/razonyang/hugomods-images-test/actions/runs/10381019819/job/28741834062#step:3:2)3.0
    extended: true
Hugo version: 0.12[3](https://github.com/razonyang/hugomods-images-test/actions/runs/10381019819/job/28741834062#step:3:3).0
Error: Action failed with error Unexpected HTTP response: [4](https://github.com/razonyang/hugomods-images-test/actions/runs/10381019819/job/28741834062#step:3:4)04

Additional context.

.

TheGroundZero commented 2 weeks ago

This has now started to fail in my Github Workflows

Run peaceiris/actions-hugo@v3
  with:
    hugo-version: latest
    extended: true

Hugo version: 0.138.0
Error: Action failed with error Unexpected HTTP response: 404
MrHinsh commented 2 weeks ago

Error: Action failed with error Unexpected HTTP response: 404

image

https://github.com/nkdAgility/NKDAgility.com/actions/runs/11896955846?pr=115

##[debug]Evaluating condition for step: 'Setup Hugo'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Setup Hugo
##[debug]Loading inputs
##[debug]Loading env
Run peaceiris/actions-hugo@v3

Hugo version: 0.138.0
##[debug]Hugo extended: true
##[debug]Operating System: Linux
##[debug]Processor Architecture: 64bit
##[debug]toolURL: https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_Linux-64bit.tar.gz
##[debug]homeDir: /home/runner
##[debug]workDir: /home/runner/actions_hugo
##[debug]binDir: /home/runner/actions_hugo/bin
##[debug]tempDir: /home/runner/actions_hugo/_temp
##[debug]Downloading https://github.com/gohugoio/hugo/releases/download/v0.138.0/hugo_extended_0.138.0_Linux-64bit.tar.gz
##[debug]Destination /home/runner/work/_temp/e86f1ea7-8f8c-4f16-ae9[2](https://github.com/nkdAgility/NKDAgility.com/actions/runs/11896955846/job/33150777634#step:6:2)-f7e811f80a06
##[debug]Failed to download from "https://github.com/gohugoio/hugo/releases/download/v0.1[3](https://github.com/nkdAgility/NKDAgility.com/actions/runs/11896955846/job/33150777634#step:6:3)8.0/hugo_extended_0.138.0_Linux-6[4](https://github.com/nkdAgility/NKDAgility.com/actions/runs/11896955846/job/33150777634#step:6:4)bit.tar.gz". Code(404) Message(Not Found)
Error: Action failed with error Unexpected HTTP response: 404
MrHinsh commented 2 weeks ago

Release 0.138.0 was deleted! https://github.com/gohugoio/hugo/issues/13066

I'm guessing that we need to wait for the cache to expire and the Action to update to the least build of hugo that replaces 0.138.0.

TheGroundZero commented 2 weeks ago

Also note: my workflow contains hugo-version: latest yet version 0.138.0 is used instead of 0.139.0 (released ca. 30 minutes ago)

MrHinsh commented 2 weeks ago

@TheGroundZero its probably cached...

@peaceiris is there a way to invalidate the cache without picking a specific version?