Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ jobs:
run: |
hugo \
--gc \
--minify
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
Expand Down
25 changes: 23 additions & 2 deletions DEPLOYMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ This site is automatically deployed to https://volttron.org via GitHub Pages whe
The production deployment workflow:
1. Installs Hugo Extended 0.126.0 and Dart Sass
2. Checks out the repository with submodules (to get the theme)
3. Builds the site using `hugo --gc --minify` in production mode
4. Deploys to GitHub Pages with the custom domain
3. Configures GitHub Pages and gets the base URL from repository settings
4. Builds the site using `hugo --gc --minify --baseURL` with the GitHub Pages configured URL
5. 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

Expand Down Expand Up @@ -67,6 +70,15 @@ rm -rf public/
- `static/.nojekyll` - Tells GitHub Pages not to use Jekyll
- Files in `static/` are copied to the root of `public/` during build

### GitHub Pages Settings
The custom domain **must** be configured in GitHub Pages repository settings:
1. Go to repository Settings → Pages
2. Under "Custom domain", enter: `volttron.org`
3. Wait for DNS check to complete (green checkmark)
4. Enable "Enforce HTTPS" once DNS is validated

The workflow uses `${{ steps.pages.outputs.base_url }}` to get this configured domain dynamically.

### Ignored Directories
The following directories are **build artifacts** and should NEVER be committed:
- `public/` - Generated site output
Expand All @@ -89,6 +101,15 @@ These are listed in `.gitignore` to prevent accidental commits.
- Cause: CNAME file missing or in wrong location
- Fix: Ensure `static/CNAME` exists and contains "volttron.org"

### Custom domain (volttron.org) not working
- **Cause**: Custom domain not configured in GitHub Pages repository settings
- **Fix**:
1. Go to repository Settings → Pages
2. Enter `volttron.org` in the "Custom domain" field
3. Wait for DNS check to pass (shows green checkmark)
4. The workflow will automatically use this domain via `${{ steps.pages.outputs.base_url }}`
- **Note**: The domain `volttron.net` redirects to `volttron.org` at the DNS level

## Deployment Checklist

Before merging to `main`:
Expand Down