Skip to content

Commit 4b6f66b

Browse files
ci(pages): allow VITE_PUBLIC_BASE_PATH override for custom domains
GitHub Pages project URLs use /<repo>/ as the asset base, but a root custom domain (e.g. inspector.neotoma.io) serves assets at /. Read optional Actions variable VITE_PUBLIC_BASE_PATH; when unset, keep format('/{repo}/') for default github.io deployments.
1 parent 839c6d0 commit 4b6f66b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/deploy-pages.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ jobs:
3030
- name: Install dependencies
3131
run: npm ci
3232

33+
# Custom domains (e.g. inspector.neotoma.io) are served at /. Default Pages URL is
34+
# https://<user>.github.io/<repo>/ — set repo variable VITE_PUBLIC_BASE_PATH to /
35+
# when using a root custom domain (see inspector README).
3336
- name: Build site
3437
env:
3538
VITE_NEOTOMA_ENV: prod
36-
VITE_PUBLIC_BASE_PATH: /${{ github.event.repository.name }}/
39+
VITE_PUBLIC_BASE_PATH: ${{ vars.VITE_PUBLIC_BASE_PATH || format('/{0}/', github.event.repository.name) }}
3740
run: npm run build
3841

3942
- name: Add SPA fallback for GitHub Pages

0 commit comments

Comments
 (0)