Skip to content

Commit 71c9df9

Browse files
committed
fix(ci): pass Vite --base to GitHub Pages build reliably
npm run build -- --base was mishandled (npm consumed --base); use npx tsc && npx vite build --base instead.
1 parent b19bb3e commit 71c9df9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/deploy-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ jobs:
3434
- name: Install dependencies
3535
run: npm ci
3636

37+
# Use npx vite directly so `--base` reaches Vite. `npm run build -- --base …` is mishandled by npm
38+
# (it treats `--base` as an npm flag and passes only the path as Vite's root directory).
3739
- name: Build
38-
run: npm run build -- --base "${{ steps.pages.outputs.base_path }}"
40+
run: npx tsc && npx vite build --base "${{ steps.pages.outputs.base_path }}"
3941
env:
4042
VITE_SUPABASE_URL: ${{ secrets.VITE_SUPABASE_URL }}
4143
VITE_SUPABASE_ANON_KEY: ${{ secrets.VITE_SUPABASE_ANON_KEY }}

0 commit comments

Comments
 (0)