Follow the Token doc then continue below.
GITHUB_TOKEN and use your value.Notes on the build command in netlify.toml config:
.env file is not needed here, since using Netlify secrets.Note that Node is already available on Netlify.
Note that this does not build to GitHub Pages.
You need to add a GitHub Actions workflow instead, which handles install and run steps and use of the token.