Deployment Guide
Step-by-step instructions for building the site locally and deploying changes to the live server.
npm run build first and upload from the dist/ folder.
Edit the source files in the project folder. Test locally first using:
npm run dev
Then open http://localhost:5173 (or the next available port) in your browser.
npm run build
This compiles and bundles all files into the dist/ folder. Each JS file gets a unique hash in its filename (e.g., admin-C6QX71M2.js). If the hash changes, you must upload both the new JS file AND the updated HTML file that references it.
After building, check which JS bundles have new hashes. Common bundles:
Always delete the old version of a JS file on Porkbun before uploading the new one.
Log in to Porkbun โ File Manager โ navigate to the correct folder. Upload in this order:
assets/[filename]-*.js filedist/assets/[filename]-*.jsdist/[page].html file(s)school/ not School/, assets/ not Assets/.
After uploading, your browser may serve cached files. Always hard refresh:
Cmd + Shift + R (Mac) / Ctrl + Shift + R (Windows)
This is especially important after uploading new JS files โ without it, the old cached JS may still run.
dist/concert.htmldist/assets/concert-xxxxx.js (if hash changed)dist/admin.htmldist/assets/admin-xxxxx.jsdist/assets/db-xxxxx.js (if db.js was changed)dist/school/[module].htmldist/assets/school[Module]-xxxxx.jsdist/assets/school-db-xxxxx.js (if school-db.js was changed)dist/school/[newmodule].htmldist/assets/school[NewModule]-xxxxx.jsdist/index.htmldist/assets/index-xxxxx.js (if hash changed)When a new feature requires a database schema change (new table, column, or policy), run the SQL in the correct Supabase project: