Deploying to Clodui
Clodui is a static hosting service; Clodui automatically optimizes your website files for speed. This guide explains how to deploy your Gatsby website to Clodui.
Clodui supports the following features to improve your website speed and development efforts :
- Serves a website served from a global CDN to reduce network latency.
- Compresses files to Brotli or GZip and serve it based on the browser support.
- Generates WebP version of all your images. Images then served based on browser support.
- Handles dynamic image resizes based on
Client-Hintheaders or query string parameters.
- Automatic form submission handling with support for webhook integration.
- Deployments are atomic with support for instant rollback.
- This guide assumes that you have a Gatsby site setup and ready to deploy
Follow these steps to deploy your website to Clodui.
Sign up to create an account using your email and password. Note : Don’t use social login like Google or Facebook to sign up because Clodui CLI doesn’t support it yet.
Install the Clodui CLI:
Set environment variables
CLODUI_PASSWORDwith Clodui username and password respectively. In Linux/macOS terminal this can be done by:
On Windows command prompt this can be done by:
To create your Clodui website from Gatsby output directory
public; run this command from the root of your Gatsby project:
The command output shows website id, name(which is your website name), deployment status and URL to your website. URL to your website is of the following format
https://<website-name>.clodui.com. URL is accessible after the deployment completes, i.e. deployment status is
If the deployment is in progress, wait for the deployment to finish. To check the latest website status, run the following command.
After your website created, to deploy new changes from
publicdirectory, run the following command.
--publishflag auto-publish the deployment so that changes are visible when you visit your website URL.
To enable continuous deployment, add this to your GitHub workflow file as a next step after building the Gatsby website.
Here Clodui credentials and website id are fetched from the GitHub secret store.