If your site is linked to a Git repository, Netlify will by default build your site according to your continuous deployment settings when you push to your Git provider. You can stop builds for your site at will for more control of your workflow. When you're ready for Netlify to build your site again, you can activate builds.
For example, you might:
- stop builds while you use a continuous integration tool to run validations and then activate builds after all validations are successful.
- stop builds while you're sequentially pushing many small commits in response to review feedback on a pull/merge request and then activate builds before you push the last commit.
- stop builds as part of implementing a content freeze and then activate builds when the freeze is over.
Stop builds vs. stop auto publishing
When you stop builds for a site, you prevent Netlify from building production deploys, Deploy Previews, and branch deploys. If you only want to stop new production deploys from being published, you can stop auto publishing.
To stop builds for a site, go to Settings > Build & deploy > Continuous deployment > Build settings, select Edit settings, and then toggle Builds to Stop builds.
When builds are stopped, Netlify will never build your site.
- If you push to your linked repository, Netlify will not build production deploys, Deploy Previews, or branch deploys.
- If requests are sent to build hook URLs, Netlify will not build your site.
- You will not be able to trigger a build of your site via the Netlify API. Any
/api/v1/sites/:site_id/buildswill return an error message.
- You will not be able to build your site via the Netlify UI. On the Deploys page, the Trigger deploy button will be unavailable. On the detail page for a past deploy, the Retry deploy button will be unavailable.
Netlify will send a notification email to let any other site members know that builds are stopped for the site. There will also be warnings in the Netlify UI:
- in the site's entry on the Sites tab.
- in the site's Overview page.
- in the site's Deploys page.
- in the site's Settings under Build & deploy > Continuous deployment > Build settings.
Relinking the Git repository will activate builds
If you relink your site's repository or link to a different repository, builds will be activated as part of the new configuration.
By default, builds are active. If builds have been stopped for a site, there are multiple ways you can activate them. You can:
go to the site's Settings > Build & deploy > Continuous deployment > Build settings, select Edit settings, and then toggle Builds to Activate builds.
go to the site's Overview page and use the Activate builds button.
go to the site's Deploys page and use the Activate builds button.
Activating builds does not trigger a build
Netlify does not immediately build your site when you activate builds. After you activate builds, Netlify will build your site when you push to your Git repository, trigger a build hook,
/api/v1/sites/:site_id/builds, or trigger/retry a deploy via the Netlify UI.
Netlify will send a notification email to let any other site members know that builds have been activated for the site.
Did you find this doc useful?
Your feedback helps us improve our docs.