- Hugo Extended v0.164.0
- GitHub Pages and GitHub Actions
Install Hugo Extended v0.164.0 or later, then run the development server from the repository root:
hugo server --buildDraftsBuild the production site with:
hugo --minifyHugo writes the generated site to public/, which is intentionally ignored by
Git.
Publishing is automatic. Merge or push a change to the master branch and the
GitHub Actions workflow builds the site and deploys it to GitHub Pages.
To publish manually, open the repository's Actions tab, select Deploy
Hugo site, click Run workflow, and choose the master branch. The deployment
URL is shown in the workflow's deploy job after it completes.
Before publishing, run hugo --minify locally and review the generated site.
In the repository settings, configure Pages to use GitHub Actions as its
build and deployment source.