Deploying a website directly from a Git repository streamlines development and updates, making development faster, easier, and more secure. However, manually deploying every project from Git can be a complex and time-consuming process. xCloud simplifies this by integrating with Git, allowing you to deploy your projects with just a few simple steps.
With xCloud, you can seamlessly integrate a Git provider, clone your git repositories, and automate deployments. This eliminates the need for manual uploads or complex server configurations, allowing you to focus on building and improving your application.
Follow this guide to easily integrate a Git provider and deploy your projects with xCloud in just a few clicks.
Step 1: Integrate a Git Provider #
To integrate Git with xCloud, start from your xCloud dashboard and navigate to the โTeam Settingsโ option located in the top-right menu. From the sidebar, go to โIntegrationsโ โ โGit Providerโ and click on the โConnect Git Providerโ button
A popup window will appear, choose โGitHubโ from the provider options. Next, enter a โLabelโ and click on the โConnect GitHubโ button to authenticate and connect your GitHub account with xCloud.
Note: You must be logged in to your GitHub account to connect with xCloud
Next, you will be redirected to authorize your GitHub account. Review the account and click on the โAuthorizeโ button to complete the authorization process.
Once the connection is successful, your account and all of your Git repositories will be visible directly from the xCloud dashboard. You can easily โEditโ or โRemoveโ the connected account at any time, depending on your requirements. Also, click on the โFolderโ icon to see the repositories of your connected GitHub account.
Step 2: Choose the Application #
To begin deployment, click on the โCreate Siteโ button from the dashboard. You will then be asked to choose โServerโ from the dropdown.
Afterwards, go to your preferred deployment options from โWordPressโ, โLaravelโ, or โCustom PHPโ as your preference. In this documentation, we are selecting the โCustom PHPโ option.
Step 3: Select the Option to Clone a Git Repository #
After that, choose the โClone A Git Repositoryโ option to import your PHP site using Git Provider.
Step 4: Set Up Domains #
The โDomainsโ tab allows you to decide how you want to configure your siteโs domain. You can either create a โDemo Siteโ or โLive Siteโ.
For this documentation, we are proceeding with the โDemo Siteโ option and clicking โNextโ to go to the next step.
Step 5: Manage Database Settings #
In the โSettingsโ tab, you will find options to configure the โPHP Versionโ and manage โSite Usersโ. Adjust these settings based on your requirements.
In the next step, you can either proceed with โNo Databaseโ, โAdd an Existing Databaseโ, or โCreate a new databaseโ directly on the server and click on โNextโ.
Step 6: Insert Git Repository Credentials #
In the โGit Repoโ tab, you will get with three repository options: โPrivate Repository (Manual SSH URL)โ, โPublic Repository (Manual HTTPS URL)โ, and โConnected Git Providerโ.
If you choose the โPublic Repository(Manual HTTPS URL)โ option, enter the โGitHub Repository URLโ into the dedicated field and branch into the โGit Branchโ.
Note: Collect the HTTPS URL from your GitHub dashboard repository to deploy the Public repository.
If you choose the โPrivate Repository(Manual SSH URL)โ option, enter the โGitHub Repository URLโ into the dedicated field and branch into the โGit Branchโ.
Note: Collect the SSH URL from your GitHub dashboard repository to deploy the Public repository.
We are going to deploy Git projects using โGit Providerโ option here. Choose the โConnected Git Providerโ option from the dropdown menu.
From the โSelect Git Providerโ dropdown, choose the connected account you want to use. Once selected, navigate through the list of repositories, pick the one you want to deploy, and then select the specific โBranchโ of that project.
Step 7: Enable Push to Deploy #
The next step is to enable automated deployment. Toggle on the โEnable push to deployโ option. You need to insert this URL into GitHub. Copy the โDeployment URLโ from here.
Note: if you want to learn more about the process, follow the steps from this document.
Step 8: Run Deployment Script #
Once the repository integration is complete, you can configure post-deployment actions. In the โDeployment Scriptโ field, enter any custom commands you want to run after deployment. You can also select one of the provided example scripts. After setting this up, click on โNextโ to continue.
Step 9: Confirm Migration #
The final step is to confirm and start the migration. Click on the โStartโ button, and the migration process will begin immediately. You will be able to monitor the progress in real time.
Once the migration is complete, a success message will appear. From there, you can access your site dashboard.
After the migration is complete, you can visit your site to see your PHP application deployed successfully. With these steps, you can quickly set up Git integration, configure your database, and launch your site with either a staging or live domain.
Whether you prefer to use Git repositories or upload files directly, xCloud provides a straightforward and secure way to bring your applications online.
If you encounter any difficulties, feel free to reach out to our support team for assistance.