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.41k stars 84 forks source link

support: Unexpected warning about the used NodeJS version #611

Closed nielsbasjes closed 1 year ago

nielsbasjes commented 1 year ago

Checklist

Describe your question

My job gives a warning

Node.js 12 actions are deprecated. 
For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. 
Please update the following actions to use Node.js 16: peaceiris/actions-hugo, peaceiris/actions-gh-pages

Relevant links

Public repository:
https://github.com/nielsbasjes/yauaa/blob/d1ee16088b5fe5a8142783097cc738d90f95f579/.github/workflows/website.yml

YAML config:
YAML workflow:

name: Documentation Website

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

jobs:
  deploy:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
          fetch-depth: 0    # Fetch all history for .GitInfo and .Lastmod

      - name: Setup Hugo
        uses: peaceiris/actions-hugo@v2
        with:
          hugo-version: 'latest'
          # extended: true

      - name: Build
        run: cd documentation && hugo --minify

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
        if: github.ref == 'refs/heads/main'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./documentation/public


### Relevant log output

This warning message is shown:

    Node.js 12 actions are deprecated. 
    For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. 
    Please update the following actions to use Node.js 16: peaceiris/actions-hugo, peaceiris/actions-gh-pages

### Additional context.

This workflow has run successfully for more than 8 months.
Apparently this is cause by a change in github:

https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
peaceiris commented 1 year ago

Thanks, I will release the next major version of this action with Nodo.js 16

nielsbasjes commented 1 year ago

I expect this to be an issue for all github actions because I have also seen this in a different project (same warning about actions/checkout and actions/checkout):

Node.js 12 actions are deprecated. 
For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. 
Please update the following actions to use Node.js 16: actions/checkout, actions/checkout
soleo commented 1 year ago

@nielsbasjes Could I help out here? I am having the same issue with a few github actions with my own site as well.

nielsbasjes commented 1 year ago

Other than the instructions on the page provided by Github I do not have additional information.

soleo commented 1 year ago

@nielsbasjes Do you wanna give soleo/actions-hugo@v3.0.0 a try? I made the changes to upgrade to node16 recently and tried to use it for my own website.

soleo commented 1 year ago

@peaceiris Feel free to take a look to see if it make sense to you

nielsbasjes commented 1 year ago

@nielsbasjes Do you wanna give soleo/actions-hugo@v3.0.0 a try? I made the changes to upgrade to node16 recently and tried to use it for my own website.

For me it currently is only a warning. So I'm just going to wait for the release and then let renovate update the version.

shenweiyan commented 1 year ago

@peaceiris Feel free to take a look to see if it make sense to you

I got the same error, and try soleo/actions-hugo@v3.0.0 , it failed with the same warning too.

peaceiris commented 1 year ago

I am planning the next major release from node12 to node16 this weekend.

github-actions[bot] commented 1 year ago

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved. If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

Log | Bot Usage