Skip to content

Deploy to Netlify button

The Deploy to Netlify button helps users deploy a private extension 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.

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/extension/start/deploy. This link requires the public Git repository as a parameter, for example:

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

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

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

Pre-fill configuration

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

  • integrationName - a string with a human-friendly name of the extension. This will be displayed in the Netlify UI.
  • integrationSlug - a string that will be used to identify the extension in the Netlify UI. It must be unique across all extensions. Private extension have a nanoid that is generated automatically as part of the slug.
  • integrationDescription - a string with a brief summary of the extension and its functionality. This will be displayed in the Netlify UI.
  • scopes - a string of comma-separated permission scopes that the extension 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

Got it!

Your feedback helps us improve our docs.