Netlify lets you link a GitHub, GitLab, or Bitbucket repository to a site for continuous deployment. Each time you push to your Git provider, Netlify runs a build with your tool of choice and deploys the result to our powerful CDN.
Basic build settings
You can specify how Netlify will build your site by going to Site settings > Build & deploy > Continuous Deployment > Build settings.
From here, you can link an existing site to a Git repository or change the currently linked repository, set a base directory, add a build command, and specify a publish directory. For public repos, you can also toggle your deploy log visibility. Builds are active by default. You can stop or activate builds at will for more control of your workflow.
- Base directory: Optional field that specifies the directory to change to before starting a build. This is where we will look for dependency management files such as
.nvmrc/etc. A common use for this field is linking a site to a monorepo (a repository that contains multiple sites or apps, each in its own subdirectory).
- Build command: If you are using a static site generator or other build tool, this is where you should specify the command to run to build your site. Visit the common configurations doc to learn about typical settings for popular tools and architectures.
- Publish directory: Directory (relative to the root of your repo) that contains the deploy-ready HTML files and assets generated by the build. If a base directory has been specified, it should be included in the publish directory path. For example, if your base directory is set to
site, the publish directory should include the
site/prefix like so:
site/public. Visit the common configurations doc to learn about typical settings for popular tools and architectures.
Build image selection
This feature is in
When a build is triggered on Netlify, our buildbot starts a Docker container running a build image. The build image is a snapshot of an operating system that is preinstalled with various software tools and other settings.
Until recently, all Netlify sites were built using the same build image. We are now experimenting with allowing customers to select from multiple images with different operating system and software versions.
You might choose a different build image to meet a software requirement for your build tool, to try out experimental build features before we release them, or to just keep up to date with the included operating system environment. This will also allow us to release breaking changes into our build image and allow users to accommodate those changes when they have time to upgrade.
All Netlify build images are stored in a public GitHub repository. The repository README includes a list of available images and instructions for testing locally.
To change the build image for a site, go to Site settings > Build & deploy > Continuous Deployment > Build image selection, and select the build image you would like to use. This image will be used for all production deploys, as well as branch deploys and Deploy Previews.
Did you find this doc useful?
Your feedback helps us improve our docs.