fix: resolve GitHub Pages 404 — add basePath and switch to official deploy action#4
Merged
Merged
Conversation
…eploy action - Add basePath '/UACP' and assetPrefix to next.config.js for project site - Update WASM module path to include /UACP prefix - Switch to actions/upload-pages-artifact + actions/deploy-pages (official) - Add pages:write, id-token:write permissions and github-pages environment - Add workflow file to path triggers for self-deployment
Copilot
AI
changed the title
fix: resolve GitHub Pages 404 by adding basePath and using official deploy action
fix: resolve GitHub Pages 404 — add basePath and switch to official deploy action
May 27, 2026
Copilot created this pull request from a session on behalf of
DaScient
May 27, 2026 00:00
View session
There was a problem hiding this comment.
Pull request overview
Fixes GitHub Pages 404s for the static-exported Next.js dashboard by ensuring routes/assets (and the runtime-loaded WASM module) resolve under the repository subpath, and by switching the Pages deployment workflow to the official GitHub Pages actions.
Changes:
- Configure Next.js static export to use
/UACPasbasePathandassetPrefix. - Update the dashboard home page to load the WASM module from the
/UACP/...URL space. - Replace
peaceiris/actions-gh-pages@v3withactions/upload-pages-artifact@v3+actions/deploy-pages@v4, and update workflow permissions/environment for Pages.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| services/web-dashboard/next.config.js | Adds GitHub Pages subpath configuration for static export. |
| services/web-dashboard/app/page.tsx | Updates WASM module URL to align with GitHub Pages project-site subpath. |
| .github/workflows/static_deploy.yml | Switches deployment to official GitHub Pages artifact upload + deploy actions with appropriate permissions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+7
to
+9
| // GitHub Pages project sites are served under /<repo-name>/ | ||
| basePath: '/UACP', | ||
| assetPrefix: '/UACP/', |
| </p> | ||
| </header> | ||
| <ClassificationViewer wasmModulePath="/wasm-engine/uacp_math_engine.js" /> | ||
| <ClassificationViewer wasmModulePath="/UACP/wasm-engine/uacp_math_engine.js" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Project site at
dascient.github.io/UACP/returns 404 because Next.js emits asset paths relative to/instead of/UACP/, and the deploy action requires manual Pages source configuration that was never set.Changes
services/web-dashboard/next.config.js— AddbasePath: '/UACP'andassetPrefix: '/UACP/'so all generated routes and static assets resolve under the project subpathservices/web-dashboard/app/page.tsx— Prefix WASM module path with/UACP(dynamic imports are outside Next.js routing, sobasePathdoesn't apply automatically).github/workflows/static_deploy.yml— Replacepeaceiris/actions-gh-pages@v3withactions/upload-pages-artifact@v3+actions/deploy-pages@v4; setpages: write/id-token: writepermissions andgithub-pagesenvironmentPost-merge
Set Settings → Pages → Source to "GitHub Actions", then trigger
workflow_dispatch.