Deploying to Netlify
To deploy your Docusaurus sites to Netlify, first make sure the following options are properly configured:
export default { url: 'https://docusaurus-2.netlify.app', // Url to your site with no trailing slash baseUrl: '/', // Base directory of your site relative to your repo // ...};Then, create your site with Netlify.
While you set up the site, specify the build commands and directories as follows:
- build command:
npm run build - publish directory:
build
If you did not configure these build options, you may still go to "Site settings" -> "Build & deploy" after your site is created.
Once properly configured with the above options, your site should deploy and automatically redeploy upon merging to your deploy branch, which defaults to main.