Skip to content

Add Deployment

Deployments are requests to deploy a certain ref (branch, SHA, tag). When new deployments are generated, Git providers send out a deployment event that external services can listen for and act on. InstaWP allows you to connect your existing Git repos — public or private — from any Git provider (GitHub, GitLab, Bitbucket, etc.) to your account.

In this documentation, we will explore the steps to add a new deployment for both repo types.

Let’s get started 🚀

Add a deployment

Step 1: Go to Settings and select the Deployments option from the drop-down list. Now, click Add New from the top right corner of the screen.

Deployments settings page with the Add New button

Step 2: A modal window will appear, requesting you to enter the values in the following fields:

FieldsDescription
Repo TypeSelect Public for a public Git repository or Private for a private one.
Repo URLFor a public repo, paste the “HTTPS URL” (for example, https://github.com/yourname/yourplugin.git). For a private repo, paste the “SSH URL” (for example, git@github.com:yourname/yourplugin.git).
BranchMention the branch to which this deployment points.
Destination FolderThe folder to which your repository content will be downloaded.
Post Deployment CommandsShell commands that will run after the git repository is cloned (for example, composer install, npm install, npm run dev, wp-config set WP_DEBUG true --raw).
SSH Key PairPrivate repos only. Select an SSH key pair or generate one to work with a private repository easily, without username and password authentication.

The post-deployment commands feature is available in the Professional plan and above. View Pricing here. If you are not logged in, use this link to view pricing.

Fill out the options with the values and click Add. It'll be added immediately.

Public repository

Select Public for the Repo Type field and paste the HTTPS URL of your repository.

Add deployment modal with Repo Type set to Public

Private repository

Select Private for the Repo Type field, paste the SSH URL of your repository, and select (or generate) an SSH key pair.

Add deployment modal with Repo Type set to Private

Step 3 (private repos only): Open the settings page for your GitHub repository and add the generated public key to the repository’s Deploy keys.

GitHub repository settings — Deploy keysAdding the generated public key as a deploy key

| 💡 Did you know - You can select the repository to deploy when the site is created from the template. Learn about connect deployment to an existing site.

https://github.com/GatoGraphQL/GatoGraphQL/blob/master/.github/workflows/integration_tests.yml

Docs are open — edit on GitHub. Built with VitePress.