JamesIves / github-pages-deploy-action

🚀 Automatically deploy your project to GitHub Pages using GitHub Actions. This action can be configured to push your production-ready code into any branch you'd like.
https://github.com/marketplace/actions/deploy-to-github-pages
MIT License
4.25k stars 357 forks source link

Deprecated Node.js 16 #1633

Closed zajo closed 3 months ago

zajo commented 3 months ago

I get this error as of recently:

Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

See https://github.com/boostorg/leaf/actions/runs/9739389690.

It appears something needs to be bumped to use a new Node.js version but I don't know where that is.

JamesIves commented 3 months ago

You're using an old version of the action, please follow the v4 upgrade guide here: https://github.com/JamesIves/github-pages-deploy-action/discussions/592

zajo commented 3 months ago

It is not clear to me what do I need to change to make it use new Node.js. I made the changes described in the link you gave me but it seems the Node.js version is specified elsewhere?

JamesIves commented 3 months ago

GitHub Actions are built with NodeJS, the warning you're getting is not due to the version of Node you're using but instead the version of the actions that were built with an earlier version that your workflow uses.

Version 3 of this action was built with 16 whereas 4 was built with 20. Which means that you'll no longer get the warning if you upgrade to the latest version. That being said you may also need to update other actions in your workflow (like actions/checkout) to ensure that you're using the latest version there too for the same reason otherwise you'll continue to get more warnings (I think the latest is also v4).

I try to keep the README of this project up to date with the latest versions of all dependencies so you may want to check there and update the different bits of your workflow, or use Dependabot for automatic dependency updates in your project. Hope that helps!