Skip to content

Commit ca86ebb

Browse files
Changes
Co-authored-by: ghostcodedynamics <295822717+ghostcodedynamics@users.noreply.github.com>
1 parent 64e9595 commit ca86ebb

1 file changed

Lines changed: 10 additions & 21 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff 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
@@ -71,4 +60,4 @@ jobs:
7160
steps:
7261
- name: Deploy to GitHub Pages
7362
id: deployment
74-
uses: actions/deploy-pages@v4
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)