This page covers features and tools you can use to create deploys with or without continuous deployment.
When you create a deploy manually without continuous deployment, Netlify does not run a build command.
Deploy with Git
Continuous deployment works by connecting a Git repository to a Netlify site and keeping the two in sync.
Netlify will run your build command and deploy the result whenever you push to your Git repo. The benefits of Netlify's continuous deployment include:
- No deploying without committing and pushing first
- Easy collaboration through pull/merge requests
- Fix a typo through your Git provider's web UI from your mobile
- Edit content without code by using a static site CMS, Netlify CMS
Drag and drop
You can create a new site by dragging a project folder to the deploy dropzone in Netlify Drop or at the bottom of Sites. If your site is not connected to a Git repository, you can deploy your site manually by using the deploy dropzone at the bottom of the Deploys page. For teams without sites, a deploy dropzone will also appear in Team overview.
You can use the API to create deploys manually using a file digest or a zip file.
Deploy to Netlify button
The "Deploy to Netlify" button helps users deploy new sites from templates with one single click. It provides web developers a simple one-click step to let their users deploy those applications on Netlify.
It's designed to be used in README files, documentation sites, and probably anything that renders as an html file.
This is an example of how it looks:
The template code must be available in a public repository stored on GitHub.com or GitLab.com.
You can use any markup language that renders as HTML to display the button. There are two very important URLs that you'll need:
The SVG URL for the button:
The URL the button takes users to:
https://app.netlify.com/start/deploy. This link requires the public Git repository as a parameter, for example:
You can provide a set of default values for your template directly in the template's git repository. Create a
netlify.toml file in the root of the repository, if you don't have it already. We'll read the information from there. This file can also be used to set options for continuous deployment, you can read more about it in the file-based configuration documentation.
[template] section in that file, you can set two directives:
A list of incoming hooks for the users site. This is very useful if you want to allow a third party service to control when to deploy the site. This is what headless CMS services like Contentful and DatoCMS do. Users can give those providers the address Netlify generates for their specific incoming requests.
[template] incoming-hooks = ["Contentful"]
A list of required environment variables. This is the way to let users configure specific configuration options upon deployment. It also enables customization without having to change the code of the base template.
[template.environment] SECRET_TOKEN = "change me for your secret token" CUSTOM_LOGO = "set the url to your custom logo here"
Pre-fill environment variables
You can pass environment variable values for the site template in the hash of the template’s Deploy to Netlify URL with key/value pairs. Using the example environment variables above,
CUSTOM_LOGO, the resulting URL will be something like this:
Passing environment variable values in the hash ensures that they’re processed on the client side only. You can can create custom Deploy to Netlify buttons for your users with tokens and other secure data, and they won’t appear in Netlify logs.
Build hooks give you unique URLs you can use to trigger new builds and deploys.
Netlify is available on Zapier, where you can connect Netlify with over 1,000 other applications. You can use Zapier "Zaps" to start a new deploy of your site in response to a trigger from another service. You can find out more on our blog, or use one of the templates below to get started:
Did you find this doc useful?
Your feedback helps us improve our docs.