![]() In this example, only the Python library’s documentation site will be hosted on Netlify. For example, consider a Python library that has documentation in a fully self-contained subdirectory that includes any necessary configuration files. You may need to build a self-contained site from within a larger repository. # Build a single site from a subdirectory or monorepo For each setup below, note that you can customize the default ignore builds behavior to determine whether or not your site builds as changes are made. One notification per repo: limits commit checks and commit statuses in a pull/merge request or commit list to one linked site only, regardless of the number of sites linked to a repository.Ĭonsider the following suggestions based on your project configuration and tools. Multiple notifications per repo: enables commit statuses and commit checks for multiple sites linked to a repository. These types of deploy notifications are available on commit lists and pull/merge requests for Netlify sites connected to GitHub or GitLab.įor your Netlify team, go to Team settings > Sites > Notifications > Commit status notifications and select one of the following options. You can manage the amount of commit status and commit check notifications for projects where one repository builds multiple applications. This can result in slower builds and triggering unwanted builds from changes elsewhere in your project repository. If you change to a directory to build instead of setting a base directory, Netlify may not search for npm dependencies in the right place, our buildbots won’t cache the build appropriately, and they won’t automatically ignore everything outside that subdirectory when triggering a build. A base directory specified in a root-level netlify.toml overrides the UI setting.Ĭonfiguring a base directory instead of prepending something like cd SUBDIRECTORY_PATH & to your build command ensures a more efficient build. If not explicitly set, the base directory defaults to the root of the repository. You can create different buttons for each site in your monorepo by setting a different base value for each button. if you’re creating a Deploy to Netlify button for other people to easily clone and deploy your site, use the base query parameter to set the base directory for that button.The current working directory is then specified as the base. Change to the subdirectory that you’d like to set as the base, then run the netlify init command. using Netlify CLI when setting up continuous deployment for a site.You can include an additional netlify.toml in the base directory for all other site configuration settings aside from base. If you’re using a netlify.toml to set a base directory for a monorepo, the file must be at the root of the repository. ![]() Use the base property under settings as demonstrated in this sample netlify.toml file. Site configuration > Build & deploy > Continuous Deployment > Build configuration. For an existing site, you can update the setting at
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |