Skip to content

Commit 1819c6d

Browse files
authored
Modify build command and add 404.html for SPA
Updated build command to use npx and added step to copy 404.html for SPA routing.
1 parent 2c61c8d commit 1819c6d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,10 @@ jobs:
2525
run: npm ci --legacy-peer-deps
2626

2727
- name: Build
28-
run: npm run build -- --configuration production --base-href /movie-DB/
29-
env:
30-
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
28+
run: npx ng build --configuration production --base-href /movie-DB/
29+
30+
- name: Add 404.html for SPA client-side routing
31+
run: cp dist/app3/index.html dist/app3/404.html
3132

3233
- name: Deploy to gh-pages
3334
uses: peaceiris/actions-gh-pages@v4

0 commit comments

Comments
 (0)