Configuring Push to Deploy
When you enable Push to Deploy for your Git site a Deployment URL will be automatically generated for you. You need to configure your Git provider to send 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 optionally run a deployment script afterwards (if you have it configured).
Here are some instructions for configuring your Deployment URL with some popular Git providers:
GitHub
At your GitHub repository navigate to Settings > Webhooks > Add Webhook.
- Enter the generated Deployment URL in the Payload URL field.
- Set the Content type to “application/json”.
- Leave the Secret field blank.
- 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.
- Enter the generated Deployment URL in the URL field.
- Leave the Secret Token field blank.
- 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.
- Add a Title.
- Enter the generated Deployment URL in the URL field.
- 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.