CDNShark Documentation

Web Hosting

← Back to Documentation

Deploy Your Site with Git

The Git tab connects your hosting account to Git, so deploying is a git push or a click instead of uploading files.

Two ways to work

Clone from GitHub / GitLabPush to your hosting account
Your code lives onGitHub, GitLab, Bitbucket or any HTTPS Git hostYour computer; the hosting account is the remote
Deploy byPull & Deploy, or automatically with a webhookgit push
GuideClone and Deploy from GitHub or GitLabPush to Your Hosting Account with Git

What a deploy does

Each repository has a branch to deploy (usually main) and a folder to deploy into, for example domains/example.com/public_html. A deploy makes that folder match the branch:

  • files in the repository are written, overwriting older versions;
  • files you deleted from the repository are removed;
  • files the repository doesn't track are left alone: uploads, .env, wp-config.php, caches.

The repository itself (with its full history) is stored in repositories/, outside your websites, so it's never downloadable. It counts towards your disk quota.

Which folder?

  • Static site or theme: deploy straight into public_html.
  • App with source code or settings (Laravel, Symfony, a Node build…): leave Folder blank to deploy into the domain folder, and keep your public files in a public_html/ folder inside the repository. Everything else stays out of reach of visitors.
Inside public_html, every file the repository tracks can be downloaded by anyone who knows its name. Keep passwords and keys out of the repository, or use the domain-folder layout.

Every deploy is recorded, and you can go back to any earlier version: Roll Back to an Earlier Version.