Skip to content

Deployment

Lavesh Paryani edited this page Sep 26, 2026 · 1 revision

Deployment

Frontend: GitHub Pages

.github/workflows/deploy.yml deploys the site on every push to main (or master) and can be run by hand from the Actions tab. The repository's Pages source must be set to GitHub Actions.

Build job

  1. Checks out the repository with lfs: false, so the LFS videos are not downloaded. The build does not need them because nothing mounted imports them.
  2. Sets up Node.js 18 and caches frontend/node_modules.
  3. Runs npm install and npm run build in frontend/ with NODE_ENV=production and the EmailJS values from repository secrets: VITE_EMAILJS_SERVICE_ID, VITE_EMAILJS_TEMPLATE_ID, VITE_EMAILJS_PUBLIC_KEY.
  4. Adds .nojekyll to frontend/dist/ and uploads it as the Pages artifact.

Deploy job

Publishes the artifact with actions/deploy-pages to the github-pages environment: https://stackified.github.io/euphoric/

Routing

Vite builds with base: "/euphoric/", and the app uses HashRouter, so every route is served from index.html (/euphoric/#/gallery) and no server rewrites are needed. frontend/public/404.html is copied into the build as a fallback page.

If the site moves to a custom domain at the root, change base in frontend/vite.config.js to / and update the paths in frontend/public/404.html.

Backend: not deployed

No workflow or hosting config exists for backend/. To deploy it:

  1. Provision a MySQL database and set DB_HOST, DB_USER, DB_PASSWORD, DB_NAME (and DB_SSL=true if the provider requires it).
  2. Deploy the backend/ folder to a Node.js host with start command npm start and set PORT, NODE_ENV=production and FRONTEND_URL=https://stackified.github.io (CORS compares the request origin, which has no path).
  3. Optionally set EMAIL_* for enquiry notifications and REDIS_* for caching.
  4. Protect or remove the event write routes, then wire the frontend to the API (see Architecture).

Clone this wiki locally