Push-to-Deploy

Push-to-Deploy is a way to automatically deploy your site live once you push code to a Git repo.

How to Use Push-to-Deploy

To get started, you’ll need the following:

  1. A site managed in a Git repo.
  2. SSH access to that specific Git repo.
  3. A live SpinupWP server.

You can enable Push-to-deploy at the point of creating a site by selecting the Clone a Git Repository option.
Clone a Git Repository option.

Alternatively, you can enable Push-to-deploy via the Git tab in the site dashboard.

Git Tab option.

Either way, you will need to add the following details:

  1. The SSH path for your site’s Git repo. The Push-to-Deploy feature will use SSH to connect to the repository.
  2. The Git branch to push from. This is going to be master or main in most cases, but it’s important to get this correct, as you’ll encounter an error otherwise.

You can optionally add any post-deployment scripts you might need in the “Deploy Script” area, such as installing packages via Composer or building any front-end assets.

If you haven’t set this up already, SpinupWP will also require you to configure an SSH connection between Git and SpinupWP. Usually, this is done the first time you try to configure a site with Git details.

Once you’ve configured the Git details, enable Push-to-deploy by switching the Push-to-deploy toggle.

When you enable Push-to-deploy for your Git-enabled site a Deployment URL will be automatically generated for you. You will then need to configure your Git provider with this Deployment URL, which sends a POST request to this URL to trigger a deployment (normally after a push).

A deployment will pull the latest changes from your Git repository to the site on your server and run the deployment script afterward (if you have it configured).

Configure your deployment URL

Here are instructions for configuring your Deployment URL with some popular Git providers:

GitHub

At your GitHub repository navigate to Settings > Webhooks > Add Webhook.

Webhooks to Add Webhooks

  1. Enter the generated Deployment URL in the “Payload URL” field.
  2. Set the Content type to application/json.
  3. Leave the “Secret” field blank.
  4. Leave the other setting as their defaults.

After hitting Add webhook you can go back to configuring your site. The next time you push code to your repository a deployment should be automatically triggered in SpinupWP.

GitLab

At your GitLab repository navigate to Settings > Integrations.

  1. Enter the generated Deployment URL in the “URL” field.
  2. Leave the “Secret Token” field blank.
  3. Leave the other setting as their defaults.

After hitting Add webhook you can go back to configuring your site. The next time you push code to your repository a deployment should be automatically triggered in SpinupWP.

BitBucket

At your BitBucket repository navigate to Settings > Webhooks > Add Webhook.

GitLab Integrations

  1. Add a “Title”.
  2. Enter the generated Deployment URL in the “URL” field.
  3. Leave the other setting as their defaults.

After hitting Save you can go back to configuring your site. The next time you push code to your repository a deployment should be automatically triggered in SpinupWP.

Start Your 7-Day Free Trial

Start your SpinupWP journey today and spin up your first server within minutes.

Subscribe to get the latest news, updates and optimizations in performance and security.

Thanks for subscribing 👍

To receive awesome stuff, you'll need to head to your inbox and click on the verification link we sent you.
Make sure to check your "spam" folder or your "promotions" tab (if you have Gmail).
If you're still having trouble, then message us at sudo@spinupwp.com.

You are already logged in

It looks like you are already logged in to SpinupWP.

Please log out of this account to continue.

Registration Successful

Thanks for registering for a new
SpinupWP account.

Before getting started, could you verify your email address by clicking on the link we just emailed to you?

SpinupWP

Free Trial

Start Your 7-Day Free Trial

No credit card required. All features included.

By signing up to SpinupWP, you agree to our Terms and Conditions.
For privacy related information, view our Privacy Policy.