Skip to content

Deploy to Netlify button

The Deploy to Netlify button helps users deploy a private integration from templates with one single click. It’s designed to be used in README files, documentation sites, and anything that renders as an HTML file.

The template code must be available in a public repository stored on GitHub.com or GitLab.com. You can find an example of this button in use in the README of our build event handler template repository. We’ve also included an example here:

Deploy to Netlify

Markup

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: https://www.netlify.com/img/deploy/button.svg.

  • The URL the button takes users to: https://app.netlify.com/integration/start/deploy. This link requires the public Git repository as a parameter, for example:

    https://app.netlify.com/integration/start/deploy?repository=https://github.com/netlify/sdk-build-event-handler-template

Here is an example of the full Markdown or HTML code for a Deploy to Netlify button that deploys an example of an integration with a build event handler component:

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/integration/start/deploy?repository=https://github.com/netlify/sdk-build-event-handler-template)
<a
href="https://app.netlify.com/integration/start/deploy?repository=https://github.com/netlify/sdk-build-event-handler-template"
><img src="https://www.netlify.com/img/deploy/button.svg" alt="Deploy to Netlify"
/></a>

Prefill configuration

When a user selects the Deploy to Netlify button, they are redirected to a configuration page in the Netlify UI for that private integration. The configuration page is created using the integration template. As a template author, it is possible to prefill these fields with default values by using the following query parameters:

  • integrationName - a string with a human-friendly name of the integration. This will be displayed in the Netlify UI.
  • integrationSlug - a string that will be used to identify the integration in the Netlify UI. It must be unique across all integrations. Private Integrations have a nanoid that is generated automatically as part of the slug. Slugs without nanoids are reserved for partner integrations.
  • integrationDescription - a string with a brief summary of the integration and its functionality. This will be displayed in the Netlify UI.
  • integrationLevel - a string with the integration level your integration will work on: site, team, or team-and-site.
  • scopes - a string of comma separated permission scopes that the integration needs to function properly. Example: &scopes=site:read,site:write. The following scopes are available:
    • site:read
    • site:write
    • env:read
    • env:write
    • env:delete
    • user:read
    • user:write
    • all

More resources