Every Site A website in CloudCannon that includes all the files, content, configuration, and settings needed to edit, build, and host a complete website. A storage location for the code and files that make up your website. CloudCannon supports the repository providers GitHub, GitLab, and Bitbucket, and highly recommends using a repository to store your website's files for better version control and collaboration.Site
Git Repository
Choosing a branch when you connect a repository#
You choose a branch on the Syncing page under Site Settings, in the same step where you pick a repository. CloudCannon offers two ways to do it.
Select the Use an existing branch option to connect to a branch that already exists, then pick it from the Branch dropdown. The dropdown is searchable, which helps in a repository with a long branch list.
Select the Create a new branch option to have CloudCannon make the branch for you. The Source branch dropdown sets the branch to copy from, and the New branch name field names the branch CloudCannon creates.
If the Branch dropdown shows a warning instead of your branches, your Permission Group is missing the org:settings:git:branch:read permission. Listing repositories needs org:settings:git:repository:read in the same way.
[docshot] The branch section of the Syncing page under Site Settings, showing the Use an existing branch and Create a new branch options above the Branch dropdown.
For the full connection walkthrough for your Git Provider A web-based service that hosts Git Repositories. CloudCannon supports GitHub, GitLab, and Bitbucket as Git Providers for syncing your website's code and content files.Git Provider
Switching the branch a Site connects to#
A Site is not tied to the branch you first chose. On the Syncing page under Site Settings, click the Switch branch button to open the Switch branch modal, pick the new branch the same way you picked the first one, then click the Switch branch button in the modal to confirm.
CloudCannon syncs the files from the new branch as soon as you confirm, so the Site shows the new branch's content straight away. Anything CloudCannon already deployed from the previous branch stays where it is; switching does not remove it.
[docshot] The Switch branch modal, showing the branch options and the Switch branch button.
Switching a branch is not the same as branching a Site. Switching points an existing Site at a different branch, and the Site stops reading the old one. Branching creates a new Site alongside the original, and is available on our Team or Enterprise plan. For more information, please read our documentation on what branching is.
Connecting several Sites to the same branch#
The relationship between branches and Sites is normally one-to-one, but nothing in CloudCannon enforces it. You can connect any number of Sites to the same branch of the same repository.
This is worth doing when one Git Repository holds more than one website, an arrangement often called a monorepo. Each website lives in its own directory, and each gets its own Site.
To tell those Sites apart, give each one its own Configuration File CloudCannon Configuration Files store the preferences and settings for your Site, allowing you to customize its functionality and appearance. CloudCannon supports cloudcannon.config.json, cloudcannon.config.yaml, or cloudcannon.config.yml file types, and allows you to split your configuration across multiple files.Configuration Files
source key in that file scopes the Site to one directory. Without this, Sites sharing a branch are duplicates of each other. For more information, please read our documentation on defining a custom Configuration File path.
How changes reach your Sites#
When anything pushes to a branch, your Git Provider notifies CloudCannon, and CloudCannon pulls that change into every Site connected to that repository and branch. A developer pushing from their local environment, a merged pull request, and an Organization Member saving in CloudCannon all take the same path.
This is what makes several Sites on one branch behave as a group. A change saved on one of them reaches the others, because all of them are reading the branch it was committed to.
If a Site receiving the change has unsaved changes to an affected file, CloudCannon pauses Syncing The process of keeping data, files, or content synchronized between different systems or locations, such as between CloudCannon and your Git Repository, ensuring that changes made in either location are reflected in both places.Syncing
Which repositories you can connect#
Connecting a GitHub, GitLab, or Bitbucket repository is available on every Subscription Plan A set of features available to your Organization, the monthly usage limits for resources, and the price you pay for access to those features and resources, monthly or annually. Each Organization in CloudCannon can have one Subscription Plan, and can update or cancel at any time.Subscription Plan