Migrating Node.js
Node.js versions have to upgraded periodically before the version being used reaches its end of life. This page outlines the steps of migrating to a higher version of Node.js.
Before upgrading the Node.js version, it is important to decide which version to upgrade to. Broadly speaking, migrate only to even-numbered Node.js releases as only even-numbered versions will be provided with Long-Term Support.
Read more about Node.js release lines here.
The npm version will be upgraded automatically accordingly to the Node.js version since it is downloaded alongside Node.js. Hence, do check that this upgrade does not cause any issues.
Install to help switch between different node versions. Switch to use the Node.js version that you are migrating to.
Testing instructions located here: markbind-action and markbind-reusable-workflows
If a different npm version is needed
Install correct version of npm in action.yml
and fork-build.yml
. Refer to Update node version from 14 to 16 PR to see where npm install should be run.
Follow steps in Deploying to Netlify but change the NODE_VERSION
value accordingly. Check there are no issues with deployment and deployed site is as expected.
MarkBind has two repos init-minimal-netlify and init-typical-netlify which allows deployment to Netlify by using a config file. Update the config file netlify.toml
with the correct Node.js version and check that deployment using button in README
works as expected.
If a different npm version is needed
To specify the npm version add an environment variable NPM_VERSION
with the correct version number.
markbind deploy command
markbind deploy
command and check there are no issues with deployment or with the site.If a different npm version is needed
neftlify.toml
neftlify.toml
file in the markbind
repo's root directory is used to deploy our documentation site to Netlify. Update the NODE_VERSION
value to the new Node.js version.