Hugo generates static websites, allowing for flexible hosting options. This page provides guides for deploying a site using Trigo on various platforms.
GitHub Pages
GitHub Pages is the recommended way to deploy and host your website for free.
WarningIn your repository settings, set the Pages > Build and deployment > Source to GitHub Actions:
By default, the above GitHub Actions workflow .github/workflows/pages.yaml assumes that the site is deploying to https://<USERNAME>.github.io/<REPO>/.
If you are deploying to https://<USERNAME>.github.io/ then modify the --baseURL:
.github/workflows/pages.yaml
| |
If you are deploying to your own domain, please change the --baseURL value accordingly.
Cloudflare Pages
- Put your site source code in a Git repository (e.g. GitHub)
- Log in to the Cloudflare dashboard and select your account
- In Account Home, select Workers & Pages > Create application > Pages > Connect to Git
- Select the repository, and in the Set up builds and deployments section, provide the following information:
| Configuration | Value |
|---|---|
| Production branch | main |
| Build command | hugo --gc --minify |
| Build directory | public |
For more details, check out: