Skip to content

fix: client SPA entry point for GitHub Pages #12

fix: client SPA entry point for GitHub Pages

fix: client SPA entry point for GitHub Pages #12

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
env:
BASE_PATH: /
- name: Ensure index.html exists for GitHub Pages
run: node scripts/generate-gh-pages-html.js
- name: SPA fallback for deep links
run: cp dist/client/index.html dist/client/404.html || cp .output/public/index.html .output/public/404.html || true
- name: Disable Jekyll processing
run: touch dist/client/.nojekyll || touch .output/public/.nojekyll || true
- uses: actions/configure-pages@v5
with:
enablement: true
- uses: actions/upload-pages-artifact@v3
with:
path: dist/client
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4