After pushing to GitHub, here's how to verify the versioning deployment worked correctly:
- Go to your repository on GitHub
- Click Actions tab
- Find the workflow run for your push
- Click on it to see details
- Verify all steps completed successfully (green checkmarks)
Look for these steps:
- ✅ Checkout code
- ✅ Setup Node.js
- ✅ npm ci
- ✅ npm run build (with DOCS_VERSION set)
- ✅ Deploy to GitHub Pages
- Go to your repository
- Click the branch dropdown (usually shows "main")
- Select
gh-pagesbranch - You should see directory structure like:
gh-pages (branch)
├── main/
│ ├── index.html
│ ├── assets/
│ │ ├── app.xxx.js
│ │ ├── chunks/
│ │ └── ...
│ ├── overview/
│ ├── scenarios/
│ └── ...
├── release-0.2/
│ ├── index.html
│ ├── assets/
│ └── ...
└── pr-preview/ (if PRs exist)
# Fetch the gh-pages branch
git fetch origin gh-pages
# Checkout gh-pages branch (don't worry, you can switch back)
git checkout gh-pages
# List directory structure
ls -la
# Should show: main/, release-0.2/, etc.
# Check main version files
ls -la main/
# Should show: index.html, assets/, overview/, scenarios/, etc.
# Check release version files
ls -la release-0.2/
# Should show: index.html, assets/, overview/, scenarios/, etc.
# Switch back to your working branch
git checkout mainVisit: https://platform-mesh.github.io/main/
Check:
- ✅ Page loads without 404 error
- ✅ Styling is correct
- ✅ Navigation works (Home, Overview, Scenarios)
- ✅ Version selector dropdown shows in nav bar
- ✅ Logo and images load correctly
Test navigation:
- Click "Overview" → Should go to
https://platform-mesh.github.io/main/overview/ - Click "Scenarios" → Should go to
https://platform-mesh.github.io/main/scenarios - Click logo → Should return to
https://platform-mesh.github.io/main/
Visit: https://platform-mesh.github.io/release-0.2/
Check:
- ✅ Page loads without 404 error
- ✅ All styling and navigation works
- ✅ Version selector shows both "main (latest)" and "v0.2"
From https://platform-mesh.github.io/main/overview/:
- Click version dropdown
- Select "v0.2"
- Should navigate to
https://platform-mesh.github.io/release-0.2/overview/ - Current page path is preserved!
From https://platform-mesh.github.io/release-0.2/:
- Click version dropdown
- Select "main (latest)"
- Should navigate to
https://platform-mesh.github.io/main/
git checkout main
git checkout -b test-pr-preview
echo "# Test" >> test.md
git add test.md
git commit -m "Test PR preview"
git push origin test-pr-preview- Go to repository → Pull Requests → New Pull Request
- Select
test-pr-previewbranch - Create PR
- Wait for workflow to complete
- Check for bot comment with preview URL
Test preview URL:
https://platform-mesh.github.io/pr-preview/pr-{number}/
Verify:
- ✅ PR preview loads correctly
- ✅ Shows your changes
- ✅ Independent from version deployments
- ✅ Version selector may show (but won't switch correctly in PR preview)
Close test PR:
- Close the PR on GitHub
- Delete the branch:
git branch -D test-pr-preview && git push origin --delete test-pr-preview
Problem: https://platform-mesh.github.io/main/ returns 404
Check:
- Is GitHub Pages enabled? (Settings → Pages)
- Is it deploying from
gh-pagesbranch? - Did the workflow complete successfully?
- Wait a few minutes (DNS propagation)
Solution:
# Verify gh-pages branch exists and has content
git fetch origin gh-pages
git checkout gh-pages
ls -la main/If main/ directory doesn't exist, the deployment didn't work. Check workflow logs.
Problem: Page loads but looks completely unstyled
Check:
- Open browser DevTools (F12)
- Go to Network tab
- Refresh page
- Look for 404 errors on CSS/JS files
Common cause: Base path mismatch
Verify in workflow logs:
Run npm run build
env:
DOCS_VERSION: main # ← Should show the version
If DOCS_VERSION is empty or wrong, the build had wrong base path.
Problem: Images showing broken icon, CSS not applying
Check DevTools console:
- Are asset URLs correct? Should be
/main/assets/... - Are assets returning 404?
Verify on gh-pages branch:
git checkout gh-pages
ls -la main/assets/
# Should show: app.xxx.js, chunks/, etc.Problem: Dropdown shows but clicking doesn't navigate
On main version:
- Open
https://platform-mesh.github.io/main/ - Open DevTools → Console
- Check for JavaScript errors
- Click dropdown
- Select "v0.1"
If 404 occurs:
- Verify
release-0.2branch was deployed - Check
https://platform-mesh.github.io/release-0.2/loads independently - Check gh-pages branch has
release-0.2/directory
Problem: Push to branch doesn't trigger deployment
Check workflow file on that branch:
git checkout release-0.2
cat .github/workflows/pages.yamlThe workflow file must exist on the branch for it to trigger!
If missing:
# Merge the workflow changes to the release branch
git checkout release-0.2
git merge main .github/workflows/pages.yaml
git commit -m "Add versioning workflow"
git push origin release-0.2Verify your GitHub Pages configuration:
- Go to repository Settings
- Scroll to Pages section (under "Code and automation")
- Source: Should be "Deploy from a branch"
- Branch: Should be
gh-pagesand/ (root) - Custom domain: (optional, leave blank if not using)
Important: The URL shown there is just https://platform-mesh.github.io/, but your docs are at:
https://platform-mesh.github.io/main/https://platform-mesh.github.io/release-0.2/
The root URL (https://platform-mesh.github.io/) might show a directory listing or 404 unless you add an index.html there.
You can see all deployments in the Actions history:
- Go to Actions tab
- Filter by workflow: "pages"
- See history of all deployments
- Click any run to see:
- Which branch triggered it
- What version was built
- Deployment success/failure
- Full logs
Use this checklist after each deployment:
Main Version (/main/):
- Homepage loads
- Navigation works (Home, Overview, Scenarios)
- Version dropdown appears
- Version dropdown shows all versions
- Styling is correct
- Images load
- Links work correctly
- Search works
Release Version (/release-0.2/):
- Homepage loads
- Navigation works
- Version dropdown appears
- Version dropdown shows all versions
- Content matches expected release version
Version Switching:
- Can switch from main to release
- Can switch from release to main
- Current page path is preserved when switching
- No 404 errors when switching
PR Previews:
- PR triggers workflow
- Bot comments with preview URL
- Preview URL loads correctly
- Shows PR changes
- Independent from version deployments
If something isn't working, use these commands:
Check deployed content on gh-pages:
# Clone just the gh-pages branch
git clone -b gh-pages https://github.com/platform-mesh/platform-mesh.github.io.git gh-pages-check
cd gh-pages-check
ls -la
# Should see: main/, release-0.2/, pr-preview/, etc.Check recent commits on gh-pages:
git fetch origin gh-pages
git log origin/gh-pages --oneline -10
# Shows recent deploymentsCompare two versions:
git checkout gh-pages
diff -r main/ release-0.2/
# Shows differences between versionsCheck file sizes:
git checkout gh-pages
du -sh main/ release-0.2/
# Both should be similar size (a few MB)Your deployment is successful when:
✅ Workflow Status:
- All workflows complete with green checkmarks
- No errors in logs
- "Deploy to GitHub Pages" step succeeds
✅ Branch Structure:
gh-pagesbranch exists- Contains
main/directory - Contains
release-X.Y/directories (if created) - Each directory has
index.htmlandassets/
✅ URLs Work:
https://platform-mesh.github.io/main/→ loads correctlyhttps://platform-mesh.github.io/release-0.2/→ loads correctly- No 404 errors
✅ Functionality Works:
- Version selector appears
- Version switching works
- All navigation links work
- Images and assets load
- Search functionality works
✅ PR Previews Work:
- PRs trigger deployments
- Preview URLs load correctly
- Independent from version deployments
The deployment creates this structure on the gh-pages branch:
gh-pages/
├── main/ ← Main branch deployment
│ ├── index.html
│ └── assets/
├── release-0.2/ ← Release branch deployment
│ ├── index.html
│ └── assets/
└── pr-preview/ ← PR preview deployments
└── pr-123/
Each directory is independently deployed and served by GitHub Pages at its corresponding URL path.
The target-folder parameter in the workflow is what creates these subdirectories automatically!