Skip to content

Commit 7cb9554

Browse files
Harshith ReddyHarshith Reddy
authored andcommitted
Fix base path configuration for consistent deployment
1 parent 656d42c commit 7cb9554

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: npm ci
2727
- name: Build
2828
working-directory: portfolio-react
29-
run: npm run build -- --base=/My-Web/
29+
run: npm run build
3030
- name: SPA fallback
3131
run: cp portfolio-react/dist/index.html portfolio-react/dist/404.html
3232
- name: Upload artifact

portfolio-react/vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default defineConfig({
2727
},
2828
},
2929
},
30-
base: '/',
30+
base: process.env.NODE_ENV === 'production' ? '/My-Web/' : '/',
3131
define: {
3232
'process.env': {},
3333
global: 'globalThis',

0 commit comments

Comments
 (0)