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
23 changes: 15 additions & 8 deletions .github/workflows/static_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ on:
- 'services/web-dashboard/**'
- 'services/math-engine/**'
- 'data-schemas/**'
- '.github/workflows/static_deploy.yml'
workflow_dispatch: {}

permissions:
contents: write # required by peaceiris/actions-gh-pages
contents: read
pages: write
id-token: write

concurrency:
group: pages-deploy
Expand All @@ -29,6 +32,9 @@ concurrency:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# -----------------------------------------------------------------
# 1. Checkout (full history; force_orphan publish needs no history,
Expand Down Expand Up @@ -127,12 +133,13 @@ jobs:
ls -la gh-pages-root | head -20

# -----------------------------------------------------------------
# 7. Publish to gh-pages branch.
# 7. Upload and deploy to GitHub Pages (official action).
# -----------------------------------------------------------------
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./gh-pages-root
publish_branch: gh-pages
force_orphan: true
path: ./gh-pages-root

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion services/web-dashboard/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function HomePage() {
Multi-station parallax + multi-modal classification, fully open-source.
</p>
</header>
<ClassificationViewer wasmModulePath="/wasm-engine/uacp_math_engine.js" />
<ClassificationViewer wasmModulePath="/UACP/wasm-engine/uacp_math_engine.js" />
</main>
);
}
3 changes: 3 additions & 0 deletions services/web-dashboard/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ const nextConfig = {
output: 'export',
images: { unoptimized: true },
trailingSlash: true,
// GitHub Pages project sites are served under /<repo-name>/
basePath: '/UACP',
assetPrefix: '/UACP/',
Comment on lines +7 to +9
};
module.exports = nextConfig;