This site is automatically deployed to https://volttron.org via GitHub Pages when changes are pushed to the main branch.
The production deployment workflow:
- Installs Hugo Extended 0.126.0 and Dart Sass
- Checks out the repository with submodules (to get the theme)
- Configures GitHub Pages and gets the base URL from repository settings
- Builds the site using
hugo --gc --minify --baseURLwith the GitHub Pages configured URL - Deploys to GitHub Pages with the custom domain
Important: The workflow uses ${{ steps.pages.outputs.base_url }} to dynamically get the custom domain configured in GitHub Pages repository settings. This ensures the site is built with the correct URLs.
Triggers: Pushes to main branch
The PR preview workflow:
- Builds the site for pull requests before merging
- Creates a downloadable artifact with the built site
- Posts a comment on the PR with preview instructions
- Allows reviewers to test changes before merging to production
Triggers: Pull requests targeting main branch
How to preview:
- Go to the PR's "Checks" tab
- Click on "PR Preview Build" workflow run
- Download the artifact named
pr-preview-{PR-number} - Extract and open
index.htmlin a browser, or use a local web server
# Initialize theme submodule (first time only)
git submodule update --init --recursive
# Start development server
hugo serveVisit http://localhost:1313 to preview changes.
public/ directory that's generated by hugo serve! It contains localhost URLs and development scripts.
# Build exactly as GitHub Actions does
hugo --gc --minify
# The output will be in the public/ directory
# Verify it looks correct, then delete it (it should not be committed)
rm -rf public/hugo.toml- Main Hugo configuration with baseURLconfig/_default/config.toml- Extended configuration including languages- Both must have
baseURL = "https://volttron.org/"
static/CNAME- Contains "volttron.org" for custom domainstatic/.nojekyll- Tells GitHub Pages not to use Jekyll- Files in
static/are copied to the root ofpublic/during build
The custom domain must be configured in GitHub Pages repository settings:
- Go to repository Settings → Pages
- Under "Custom domain", enter:
volttron.org - Wait for DNS check to complete (green checkmark)
- Enable "Enforce HTTPS" once DNS is validated
The workflow uses ${{ steps.pages.outputs.base_url }} to get this configured domain dynamically.
The following directories are build artifacts and should NEVER be committed:
public/- Generated site outputresources/- Hugo cache files.hugo_build.lock- Hugo lock file
These are listed in .gitignore to prevent accidental commits.
- Cause: The
public/directory was built withhugo serveinstead ofhugo - Fix: Delete the
public/directory and let GitHub Actions rebuild it
- Cause: The theme submodule wasn't initialized
- Fix: Run
git submodule update --init --recursive
- Cause: CNAME file missing or in wrong location
- Fix: Ensure
static/CNAMEexists and contains "volttron.org"
- Cause: Custom domain not configured in GitHub Pages repository settings
- Fix:
- Go to repository Settings → Pages
- Enter
volttron.orgin the "Custom domain" field - Wait for DNS check to pass (shows green checkmark)
- The workflow will automatically use this domain via
${{ steps.pages.outputs.base_url }}
- Note: The domain
volttron.netredirects tovolttron.orgat the DNS level
Before merging to main:
- Verify
hugo --gc --minifybuilds successfully - Check that
public/andresources/are not being committed - Confirm baseURL in both config files is "https://volttron.org/"
- Ensure
static/CNAMEexists with correct domain - Test that theme submodule is configured correctly
- Review the PR preview build artifact to verify the site looks correct
- The site uses HTTPS and is served via GitHub Pages
- Custom domain is configured via CNAME
- All builds are done in GitHub Actions with a clean environment
- No sensitive data should be committed to the repository