File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,32 +33,21 @@ jobs:
3333
3434 - name : Build
3535 run : npm run build
36+ env :
37+ # If deploying to https://<user>.github.io/<repo>/ uncomment and set the repo name.
38+ # VITE_BASE: /<repo>/
39+ VITE_BASE : /
3640
37- - name : Debug build output
38- run : |
39- echo "Root files:"
40- ls -la
41- echo "Dist files:"
42- ls -la dist || true
43- echo "Dist client files:"
44- ls -la dist/client || true
41+ - name : SPA fallback (404.html)
42+ run : cp dist/index.html dist/404.html
4543
46- - name : Copy SPA fallback
47- run : |
48- if [ -f dist/client/index.html ]; then
49- cp dist/client/index.html dist/client/404.html
50- elif [ -f dist/index.html ]; then
51- cp dist/index.html dist/404.html
52- else
53- echo "No index.html found"
54- find dist -maxdepth 3 -type f
55- exit 1
56- fi
44+ - name : Add .nojekyll
45+ run : touch dist/.nojekyll
5746
5847 - name : Upload GitHub Pages artifact
5948 uses : actions/upload-pages-artifact@v3
6049 with :
61- path : dist/client
50+ path : dist
6251
6352 deploy :
6453 runs-on : ubuntu-latest
7160 steps :
7261 - name : Deploy to GitHub Pages
7362 id : deployment
74- uses : actions/deploy-pages@v4
63+ uses : actions/deploy-pages@v4
You can’t perform that action at this time.
0 commit comments