Skip to content

Commit 8bb1100

Browse files
committed
Fix asset URLs for GitHub Pages
Use Vite BASE_URL for public assets so audio/logo load under /visualizer, and switch the Pages workflow to npm ci for reproducible installs.
1 parent f023635 commit 8bb1100

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
node-version: '20'
2828

2929
- name: Install dependencies
30-
run: npm install
30+
run: npm ci
3131

3232
- name: Build
3333
run: npm run build

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import './App.css'
55

66
// You can replace this with your own audio file
77
// Place your mp3 in the public folder and reference it here
8-
const AUDIO_SRC = '/audio.mp3'
8+
const AUDIO_SRC = `${import.meta.env.BASE_URL}audio.mp3`
99

1010
function App() {
1111
const audioRef = useRef<HTMLAudioElement>(null)

src/components/MonolithWall.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export function MonolithWall({
5252
useEffect(() => {
5353
let cancelled = false
5454
createLogoMask({
55-
src: '/sol-logo.svg',
55+
src: `${import.meta.env.BASE_URL}sol-logo.svg`,
5656
width: 768,
5757
height: 320,
5858
padding: 0.14,
@@ -230,3 +230,4 @@ export function MonolithWall({
230230
)
231231
}
232232

233+

0 commit comments

Comments
 (0)