Set the subdirectory that contains the site you want to deploy as your package directory. Whether you want to build a single site from a monorepo or multiple sites from a monorepo, the recommendations are the same: These types of deploy notifications are available on commit lists and pull/merge requests for Netlify sites connected to GitHub or GitLab and are also referenced as Commit status webhooks. You can manage the amount of commit status and commit check notifications for projects where one repository builds multiple applications. Netlify will search for configuration files in the following order: # How Netlify finds your configuration files If not set, the default value for the base directory is the root ( /).įor example, if the site’s base directory is /frontend, the site’s package directory is /frontend/packages, and the plugin is within /frontend/packages/my-app/plugins, the configuration file should specify the plugin location as /packages/my-app/plugins/netlify-plugin-check-output-for-puppy-references. To specify the location of plugins, functions, or other configuration details in netlify.toml for a site in your monorepo, use absolute paths that are relative to the base directory. Use absolute file paths in the netlify.toml For an example monorepo file structure that includes a different configuration file for each site, refer to the recommended monorepo setup section below. You can either explicitly set the location of the site’s configuration files or rely on Netlify to find it in either your base or root directory.įor a sample netlify.toml file, refer to the file-based configuration docs. Netlify needs to know which files to use for your site build. Settings in a root configuration will apply to all sites in your monorepo. The best practice is to have one Netlify configuration file for each site, where the settings in each file are unique to that site. Note that the package directory can only be set in the Netlify UI.ĭepending on your monorepo project setup, you may have one or more Netlify configuration files in your repository. You can configure most build and deploy settings for your site using a Netlify configuration file instead of the Netlify UI. To find the typical publish directory for your framework, refer to the frameworks integrations doc. using Netlify CLI when setting up continuous deployment for a site.Learn more about file-based configuration. Site configuration > Build & deploy > Continuous deployment > Build settings. Visit the frameworks doc to learn about typical publish directories for popular tools. The directory is relative to the base directory, which is root by default ( /). Publish directory: directory that contains the deploy-ready HTML files and assets generated by the build. Visit the frameworks doc to learn about typical build commands for popular tools. The build command runs in the Bash shell, allowing you to add Bash-compatible syntax to the command. Learn more about how Netlify searches for your configuration files in monorepos.īuild command: the command to run to build your site if you are using a static site generator or other build tool. Set this only if the location is different from the base directory. Package directory: typically used for monorepos, the directory that contains your site files, including the netlify.toml. Site files: source files in your repository that represent the code for your site and any related configurations. If not set, the base directory defaults to the root of the repository. The build system will use this directory to perform caching during the build process. nvmrc, installs dependencies, and runs your build command. To deploy a site from a monorepo, you may need to set or use the following:īase directory: directory where Netlify checks for dependency management files such as package.json or. Learn more about using the CLI with monorepos. This way, you can work directly from the root of your project. After you set up your site on Netlify, you can use the Netlify CLI’s -filter flag to specify which site in your monorepo to run commands on.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |