Skip to content

Commit 67cf487

Browse files
authored
Merge pull request #31 from eclipse-volttron/copilot/debug-deployment-difference
[WIP] Fix deployment issues for volttron.org and volttron.net
2 parents 9017893 + ad1f322 commit 67cf487

2 files changed

Lines changed: 25 additions & 3 deletions

File tree

.github/workflows/hugo.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ jobs:
6060
run: |
6161
hugo \
6262
--gc \
63-
--minify
63+
--minify \
64+
--baseURL "${{ steps.pages.outputs.base_url }}/"
6465
- name: Upload artifact
6566
uses: actions/upload-pages-artifact@v3
6667
with:

DEPLOYMENT.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ This site is automatically deployed to https://volttron.org via GitHub Pages whe
1111
The production deployment workflow:
1212
1. Installs Hugo Extended 0.126.0 and Dart Sass
1313
2. Checks out the repository with submodules (to get the theme)
14-
3. Builds the site using `hugo --gc --minify` in production mode
15-
4. Deploys to GitHub Pages with the custom domain
14+
3. Configures GitHub Pages and gets the base URL from repository settings
15+
4. Builds the site using `hugo --gc --minify --baseURL` with the GitHub Pages configured URL
16+
5. Deploys to GitHub Pages with the custom domain
17+
18+
**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.
1619

1720
**Triggers:** Pushes to `main` branch
1821

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

73+
### GitHub Pages Settings
74+
The custom domain **must** be configured in GitHub Pages repository settings:
75+
1. Go to repository Settings → Pages
76+
2. Under "Custom domain", enter: `volttron.org`
77+
3. Wait for DNS check to complete (green checkmark)
78+
4. Enable "Enforce HTTPS" once DNS is validated
79+
80+
The workflow uses `${{ steps.pages.outputs.base_url }}` to get this configured domain dynamically.
81+
7082
### Ignored Directories
7183
The following directories are **build artifacts** and should NEVER be committed:
7284
- `public/` - Generated site output
@@ -89,6 +101,15 @@ These are listed in `.gitignore` to prevent accidental commits.
89101
- Cause: CNAME file missing or in wrong location
90102
- Fix: Ensure `static/CNAME` exists and contains "volttron.org"
91103

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

94115
Before merging to `main`:

0 commit comments

Comments
 (0)