chabad360 / hugo-gh-pages

🚀 Build and Publish Your Hugo Site to GitHub Pages 🚀
MIT License
43 stars 11 forks source link

Broken docker image #24

Open alexandrevicenzi opened 3 weeks ago

alexandrevicenzi commented 3 weeks ago

Hi,

If I set the image to anything newer:

hugoVersion: "extended_0.128.2"

The pipeline fails with:

Using Hugo version extended_0.134.3.
Connecting to github.com (140.82.116.3:443)
Connecting to objects.githubusercontent.com (185.199.108.3:443)
saving to 'hugo_extended_0.134.3_Linux-64bit.tar.gz'
hugo_extended_0.134.  25% |********                        | 5998k  0:00:02 ETA
hugo_extended_0.134. 100% |********************************| 23.0M  0:00:00 ETA
'hugo_extended_0.134.3_Linux-64bit.tar.gz' saved
hugo
README.md
LICENSE

Versions:
Error loading shared library libresolv.so.2: No such file or directory (needed by /usr/bin/hugo)
Error relocating /usr/bin/hugo: __res_search: symbol not found
Hugo:

The default version is 0.111, which is rather old.

Versions:
Hugo: hugo v0.111.3+extended linux/amd64 BuildDate=unknown
Pygments: Pygments version 2.11.2, (c) 2006-2021 by Georg Brandl, Matthäus Chajdas and contributors.
Asciidoctor: Asciidoctor 2.0.17 [https://asciidoctor.org]
Runtime Environment (ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-linux-musl]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)
PostCSS: 10.1.0
Pandoc: pandoc 2.9.1.1
Compiled with pandoc-types 1.20, texmath 0.12, skylighting 0.8.3
Default user data directory: /github/home/.local/share/pandoc or /github/home/.pandoc
Copyright (C) 2006-2019 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
Babel: 7.21.0 (@babel/core 7.21.4)
xuchunqiu commented 6 days ago

Same situaction here. I switched to peaceiris/actions-hugo today. So far so good.

Old workflow

name: Publish Site

on:
  push:
    branches:
      - main

jobs:
  build-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
        with:
          submodules: true

      - name: Publish Site
        uses: chabad360/hugo-gh-pages@master
        with:
          githubToken: ${{ secrets.PERSONAL_TOKEN }}
          cname: blog.xuchunqiu.com
          # branch: main # Or anything else
          # Use if your site is not hosted on the gh-pages branch.
          repo: xuchunqiu/xuchunqiu.github.io
          # Use if you're pushing to a different repo.
          hugoVersion: extended_0.95.0
          args: --gc --minify --cleanDestinationDir
          # Use if you want to pass some custom arguments to Hugo.
          #siteDir: /github/workspace/public
          # Use this if your site isn't in the root of your repo.
          # The root of your repo can be found at /github/workspace

New workflow

# Docs can be found at https://github.com/peaceiris/actions-gh-pages
name: GitHub Pages

on:
  push:
    branches:
      - main

jobs:
  build-deploy:
    runs-on: ubuntu-22.04

    steps:
      - uses: actions/checkout@v4
        with:
          # Fetch Hugo themes (true OR recursive)
          submodules: true
          # Fetch all history for .GitInfo and .Lastmod
          fetch-depth: 0

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v3
        with:
          hugo-version: '0.136.3'
          extended: true

      - name: Build
        run: hugo --gc --minify --cleanDestinationDir

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        with:
          # the contents of this dir are pushed to GitHub Pages branch
          publish_dir: ./public
          cname: blog.xuchunqiu.com
          # When post to a different repo, the old githubToken no 
          # longer works. Use deploy_key or personal_token instead.
          # https://github.com/peaceiris/actions-gh-pages?tab=readme-ov-file#%EF%B8%8F-deploy-to-external-repository-external_repository
          deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
          external_repository: xuchunqiu/xuchunqiu.github.io  
          publish_branch: gh-pages