GitHub Pages offers free static hosting for Hugo sites with no server to manage. By pairing it with a GitHub Actions workflow, every commit you push to theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gurusabarish/hugo-profile/llms.txt
Use this file to discover all available pages before exploring further.
main branch automatically rebuilds your site and publishes the result — no manual hugo runs or file uploads needed.
Setup
Set your baseURL
Open
hugo.yaml in your site root and set baseURL to your GitHub Pages URL. The format depends on whether you are using a personal/organization site or a project site:Push your site to GitHub
If your site is not already in a GitHub repository, initialize one and push:
Create the GitHub Actions workflow
Create the file
.github/workflows/hugo.yml in your repository with the following content:The
submodules: recursive flag in the Checkout step is required if you added the Hugo Profile theme as a Git submodule. If you cloned the theme directly into themes/, this flag is harmless but still safe to keep.Enable GitHub Pages in repository settings
In your repository, go to Settings > Pages. Under Build and deployment, set the Source to GitHub Actions. This tells GitHub to use the artifact uploaded by the workflow rather than a branch.
Custom domain
To use your own domain with GitHub Pages:-
Create a file named
CNAMEinside your site’sstatic/directory containing only your domain name:Hugo copies everything instatic/to the root of the built site, so theCNAMEfile will be present inpublic/after each build. - In your repository, go to Settings > Pages > Custom domain, enter the same domain, and save. GitHub will verify DNS and provision a TLS certificate automatically.
-
Update
baseURLinhugo.yamlto your custom domain: