RunCloud Help

Nov 25, 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.

Step 1 : Git Repository

  1. On the Deploy Web App screen, click on Git Repository. To use this function, you must place your Deployment Key (see below) into your Git repository. You can get your deployment key in the Deployment Key section.

  2. Select a provider: Custom Git Server, Bitbucket, Github, GitLab, or Self Hosted GitLab.

  1. Enter in your Github username and the repository name.

  2. The branch, by default, should be Master, but change it if necessary.

  3. Click on Attach Git Repository to attach Git to your web application.

  4. Set up a Webhook URL so that changes may automatically be pushed.

Step 2 : Setup Web App Details, Domain and SSL/TLS

Fill in your web application name, check on whether to use an existing system user or not then choose the owner of the web application.

Choose whether you want to use the test domain which is the domain provided by RunCloud or use your own domain / subdomain.

Test Domain : 

Own Domain/Subdomain :

  • Advanced (Different SSL certificate for every domain)

  • Basic (One SSL certificate for all domains)

Select advanced to allow you to enable AutoSSL (ideal for WaaS/SaaS) for new domain names added to this web application. You can always switch back to Basic from your web application settings.

By Enabling AutoSSL, it will deploy the Let's Encrypt SSL certificate automatically for newly added domains on this web app.

Step 3 : Git Setup

Fill in the repository name and branch. The deployment key will be generated automatically then place the deployment key into your Git repository.

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.

Then, hit on the deploy button.

Hook your repository to your web application by clicking the web application that you have just created and click on the Git tab. Then, go to your atomic deployment project (You can create atomic deployment project first step-by-step).

Scroll down a little bit and you will find the project info section. Copy and 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 pushed it to the branch that you have chosen before.

Note - You need to make sure that the content type is application/json to avoid an issue in the future.