RunCloud Help

Jun 01, 2022

How to deploy a web app using Git?

One of the best features of RunCloud is that you can use Git to attach your project to your Web Application. 

You can do an automatic pull to sync your website with your code. 

You can also change your Git branch on the fly. If you are using Git, you won't be able to use Script Installer inside the Web Application.

  1. On the Web Application screen, click on Git. To use this function, you must place your Deployment Key (see below) into your Git repository. You can get your deployment key in Deployment Key section.
  2. Select a provider: Custom Git Server, Bitbucket, Github, GitLab, or Self Hosted GitLab.
  3. Enter in your Github username and the repository name.
  4. The branch, by default, should be Master, but change it if necessary.
  5. Click on Attach Git Respository to attach Git to your web application.
  6. Set up a Webhook URL so that changes may automatically be pushed.

Generating a Deployment Key:

  1. Navigate the main menu to Deployment Key.
  2. Click on Generate new deployment key.
    • Copy this key which you will insert inside GitHub, GitLab, Bitbucket or custom Git Server repository to enable Git deployment for your web application.

Copy the generated Deployment Key and head to repository settings in the GitHub. On the left side menu bar, you will find the Deploy Key and add the key to the GitHub repository.

Hook your repository to your web application by click the web application that you have just created and click on the Git tab. Fill in your repository details inside the simple form as shown below.

(New RunCloud Dashboard 2021)

After you have cloned your Git repository to your server, you will get the WebHook URL. Add this WebHook URL to your repository settings inside the GitHub. WebHook URL will automatically instruct your server to pull the latest changes of your code if you have push it to the branch that you have chosen before.

If you need additional information or guidance, we have a visual tutorial guide available on Facebook.

Click on play to start an in-depth video tutorial below for a full visual on Git usage with RunCloud.