Skip to content

Commit 29a3db2

Browse files
committed
Refactor GitHub Actions workflow to improve readability and add SPA routing for 404 handling
1 parent 901d9bf commit 29a3db2

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,22 +22,25 @@ jobs:
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
25-
25+
2626
- name: Setup Node.js
2727
uses: actions/setup-node@v4
2828
with:
2929
node-version: "20"
3030
cache: "npm"
31-
31+
3232
- name: Setup Pages
3333
uses: actions/configure-pages@v4
34-
34+
3535
- name: Install dependencies
3636
run: npm ci
37-
37+
3838
- name: Build
3939
run: npm run build
40-
40+
41+
- name: Copy index.html to 404.html for SPA routing
42+
run: cp dist/index.html dist/404.html
43+
4144
- name: Upload artifact
4245
uses: actions/upload-pages-artifact@v3
4346
with:

0 commit comments

Comments
 (0)