Now that you have seen what CloudCannon can do in a demo or template, it’s time to connect your own files. Your site will be processed in a Continuous Integration / Continuous Deployment (CI/CD) workflow with each save. Connecting your site is about defining two things: setting a source for your files, and configuring your chosen SSG for your auto-build process.
To open the build process:
- Navigate to Sites in the sidebar, and click Add new site
- From the dropdown, select Connect your own files
You’ll see the page split into two columns with a familiar terminal on the right. This terminal is your window into CloudCannon. You’ll get feedback from the system on what’s going on behind the scenes. Across the top of the page you’ll find the progress bar as well as the confirmation button in the top right.
The first step in the process is to give your site a name. With your chosen name added to the field click Create Site in the top right corner of the browser window to move onto the Sync Files step.
Syncing your files#
Setting the source of your files is a key step in CloudCannon’s build process. You have two major options to add files from: a Git provider or direct upload.
Syncing files with your Git provider gives you a range of extra workflow options including branching and version control, and allows you to push from your Git to CloudCannon. It also puts the power of Git in the hands of your editors — without them needing to understand the technical side of Git.
Sync with your Git Repository:
- Select your Git provider from the File source dropdown.
- If you have not yet connected your chosen Git provider to your CloudCannon account, click the button labelled Authenticate. Read the following guides on connecting:
- Once authenticated, select your repository from the Repository dropdown. You can choose an existing branch, or create a new branch from an existing branch.
- Once you have file details added, click Sync Files in the top right of the browser.
Direct upload your files
If you prefer, you can also add your files directly to CloudCannon.
- Choose your upload option, either to Upload a folder or Upload a zip file.
- Select your file location by clicking the Local folder button that appears.
- You will be prompted to select a folder/zip file from your local device.
- CloudCannon will ask you to confirm. Click Upload to confirm.
- Once uploaded and confirmed, click Sync Files in the top right of the browser.
CloudCannon will keep your site files in sync with your repo.
Building your site#
The final step is to choose and configure your chosen Static Site Generator (SSG). Your files will be coded with one in mind and CloudCannon should be able to automatically detect it.
- Confirm the SSG detected is the one you want to use, if not use the drop down to select your preferred one.
- You can then configure your build using the fields down the left half of the screen. You can make changes to these later.
- A preview of your build command will show in the terminal on the right.
- Once you have configured your build, click Build Site in the top right of your browser.
Once your site has been built, you will be navigated to your site’s dashboard. Your site is now ready to be used in CloudCannon!