Articles on: Deployments

Connect to Site

Once you have added deployment to your InstaWP account, you can connect Git Repository (Deployment) to an existing site. So, every new push to the branch will update the code inside the site.

In this documentation, we will explore the steps to connect a Git repository to a site.

Let’s get started 🚀

Step 1: Sign In to your InstaWP account to access the dashboard.



Step 2: Click on the site that you want to connect to the Git repository.



Step 3: Select the Git Deployment option from the left menu.



A new window will appear, where you will find the Git Deployment dialog, allowing you to deploy repository code automatically to the website.



Step 4: Select the repository you have added to your account. For more information, you can refer to the Add a deployment document.

So that, every new push to the selected Git branch will update the code inside the site.



Step 5: Click on the Copy icon which is right to the InstaWP site webhook URL.



Step 6: Navigate to the selected GitHub repository’ Webhook setting to add a webhook that will deploy repository code automatically to the InstaWP website.



Step 7: A new window will appear for adding the webhook, paste the Payload URL (where you'd like to receive payloads) & Content type (data format to receive the webhook payload in).



Step 8: Click on the Add webhook button to attach the site webhook URL to your GitHub repository.



Step 9: From the InstaWP Git deployment page, click on the Save button to update the repository list to the site on every push.



Then, you will get a success message on your screen.



Now, you can make some changes to the plugin with the code editor.



Following that, you can type the git commit -a -m 'updated test' command in your terminal (Command Prompt).
Hit enter. Then, you need to push the Git, by typing the git push command and hit enter.

This will call the webhook and update the changes you made to the website. You can see that the plugin has been added.



Note: The user needs to activate the plugin the first time following any changes made to the website. After that the user no need to activate it again.

Then, you can see the changes you made, by visiting your site.



Further, you can view the logs related to deployments, commands, etc.


💡 Did you know - You can make changes to the staging site and push that changes to your live (production) site from your WP admin panel. Learn about 2 Way sync.

Updated on: 09/04/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!