Skip to content

Commit b6f9cc0

Browse files
committed
chore: add workflow
1 parent 512581b commit b6f9cc0

3 files changed

Lines changed: 48 additions & 1 deletion

File tree

.github/workflows/pages.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# .github/workflows/pages.yml
2+
name: Deploy static content to Pages
3+
4+
on:
5+
push:
6+
branches: [ "main" ]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: true
17+
18+
jobs:
19+
deploy:
20+
environment:
21+
name: github-pages
22+
url: ${{ steps.deployment.outputs.page_url }}
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
- name: Set up Node
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: lts/*
31+
cache: npm
32+
- name: Install deps
33+
run: npm ci
34+
- name: Build
35+
run: npm run build
36+
# (SPA routing fix; optional — see Gotchas below)
37+
- name: Add 404 fallback for SPA
38+
run: cp dist/index.html dist/404.html
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v5
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: ./dist
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v4

client/tsconfig.node.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"strict": true,
1818
"noUnusedLocals": true,
1919
"noUnusedParameters": true,
20-
"erasableSyntaxOnly": true,
2120
"noFallthroughCasesInSwitch": true,
2221
"noUncheckedSideEffectImports": true
2322
},

client/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
44
// https://vite.dev/config/
55
export default defineConfig({
66
plugins: [react()],
7+
base: './',
78
})

0 commit comments

Comments
 (0)