Skip to content

fix: resolve GitHub Pages 404 — add basePath and switch to official deploy action#4

Merged
DaScient merged 1 commit into
mainfrom
copilot/fix-gitpages-404-error
May 27, 2026
Merged

fix: resolve GitHub Pages 404 — add basePath and switch to official deploy action#4
DaScient merged 1 commit into
mainfrom
copilot/fix-gitpages-404-error

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 27, 2026

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 — Add basePath: '/UACP' and assetPrefix: '/UACP/' so all generated routes and static assets resolve under the project subpath
  • services/web-dashboard/app/page.tsx — Prefix WASM module path with /UACP (dynamic imports are outside Next.js routing, so basePath doesn't apply automatically)
  • .github/workflows/static_deploy.yml — Replace peaceiris/actions-gh-pages@v3 with actions/upload-pages-artifact@v3 + actions/deploy-pages@v4; set pages: write / id-token: write permissions and github-pages environment

Post-merge

Set Settings → Pages → Source to "GitHub Actions", then trigger workflow_dispatch.

…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 AI requested a review from DaScient May 27, 2026 00:00
@DaScient DaScient marked this pull request as ready for review May 27, 2026 00:58
Copilot AI review requested due to automatic review settings May 27, 2026 00:58
@DaScient DaScient merged commit 9ab7a4c into main May 27, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 /UACP as basePath and assetPrefix.
  • Update the dashboard home page to load the WASM module from the /UACP/... URL space.
  • Replace peaceiris/actions-gh-pages@v3 with actions/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" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants