Sys.Witch V2 is a fully static site — the Vite build produces aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/sys.witch-v2/llms.txt
Use this file to discover all available pages before exploring further.
dist/ folder of HTML, CSS, and JS files that can be deployed to any static host. GitHub Pages is the simplest option for a public portfolio.
Build the Site
Run the Vite production build before deploying to any host:dist/ directory contains the compiled assets/main.js, assets/main.css, and the HTML entry points. Everything needed to serve the site is self-contained in that folder — there is no server process, no database, and no build step required on the host.
Deploy to GitHub Pages
Configure Vite base path
If your site will be served from a sub-path — for example If you are deploying to a root custom domain (e.g.
https://username.github.io/sys.witch-v2/ rather than a root custom domain — you must tell Vite the base path so that asset URLs resolve correctly.Add the base option to vite.config.js:https://yourname.dev), you can skip this step or set base: '/'.GitHub Pages requires the repository to be public, or the repository owner must have a GitHub Pro or Teams plan to enable Pages on a private repository.
Create a GitHub Actions workflow
Add the following file to your repository. The workflow installs dependencies, builds the site, and pushes No additional secrets setup is needed —
dist/ to the gh-pages branch automatically on every push to main.GITHUB_TOKEN is provided automatically by GitHub Actions.Enable GitHub Pages
In your repository on GitHub, go to Settings → Pages. Under Source, choose Deploy from a branch, then select the
gh-pages branch and the / (root) folder. Save.The gh-pages branch is created automatically the first time the workflow runs successfully.Deploy to Netlify
Drag-and-drop (quickest): runnpm run build locally, then drag the dist/ folder onto app.netlify.com/drop. The site is live in seconds with a generated .netlify.app URL.
Netlify CLI:
npm run build and the publish directory to dist. Netlify will rebuild and redeploy on every push.
Deploy to Vercel
Deploy to Cloudflare Pages
- Open the Cloudflare Dashboard → Pages → Create a project.
- Connect your GitHub repository.
- Set the following build settings:
- Build command:
npm run build - Build output directory:
dist
- Build command:
- Save and deploy. Cloudflare Pages rebuilds the site on every push to the production branch.
React Router and Client-Side Routing
Sys.Witch V2 uses React Router v6 for client-side routing. When a user navigates directly to/projects or /about (via a bookmarked URL, a shared link, or a browser refresh), the static host looks for a file at that path — which does not exist — and returns a 404.
The fix is to instruct the host to serve index.html for all routes and let React Router handle the path on the client side. Each host has a different mechanism:
GitHub Pages — add a 404.html to public/ that uses the classic SPA redirect workaround. The 404.html stores the current path in sessionStorage and redirects to index.html, which then reads it back and navigates to the correct route:
index.html to read from sessionStorage and restore the route on load.
Netlify — add a _redirects file to public/ (Vite copies public/ contents to dist/ at build time):
vercel.json to the project root:
_routes.json to public/: