Update Hugo for Node 16 Github Pages

Recently, GitHub updated actions from Node 12 to Node 16 (See GitHub Actions: All Actions will begin running on Node16 instead of Node12). As a result, Hugo deploys will fail. All I saw was that I committed the updated site, and the deploy did not happen.

To make it work again, you need to update your gh-pages.yml in the hidden .github/workflows folder to reflect the new Ubuntu and checkout versions:

...
jobs:
  deploy:
    runs-on: ubuntu-22.04
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: true  # Fetch Hugo themes (true OR recursive)
...

Diff is:

And deploy works again.

Posted By Hilton Lipschitz · Nov 3, 2022 12:23 PM