File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1717 "strict" : true ,
1818 "noUnusedLocals" : true ,
1919 "noUnusedParameters" : true ,
20- "erasableSyntaxOnly" : true ,
2120 "noFallthroughCasesInSwitch" : true ,
2221 "noUncheckedSideEffectImports" : true
2322 },
Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react'
44// https://vite.dev/config/
55export default defineConfig ( {
66 plugins : [ react ( ) ] ,
7+ base : './' ,
78} )
You can’t perform that action at this time.
0 commit comments