[[Docusaurus]] sites can be deployed to [[Netlify]] from the CI of our [[Forgejo]] instance. It's necessary to set the two variables in the settings for the repository:
*`NETLIFY_AUTH_TOKEN` (secret, so goes into **Actions -> Secrets**)
*`NETLIFY_SITE_ID` (pretty sure isn't secret, so goes into **Actions->Variables**)
Running `netlify build` without being logged in seems to generate errors. Rather just use `npm run build` to generate the build in the `build/` directory.
Running `netlify deploy` will automatically detect these as environment variables, but setting the values as variables in Forgejo does not automatically make them into environment variables, so they should be passed explicitly in the commands.
## Example Workflow
This workflow uses [[npm]] to manage the dependencies, rather than having them managed by [[Nix]]. This may introduce discrepancies between environments, but the `package-lock.json` should be minimising those even if not providing any guarantees.