GitHub Pages is the natural home for a portfolio SPA like Digital Domain — it is free, requires zero infrastructure, and lives right alongside your source code. Because the repo already commits its built output to the root directory, you can have a live site running in under two minutes by flipping a single setting in your repository. For ongoing development with automated deploys, a GitHub Actions workflow can rebuild and publish on every push toDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/apursley2012/digital-domain/llms.txt
Use this file to discover all available pages before exploring further.
main. This guide covers both approaches, plus the SPA routing fix required for React Router deep links to work correctly.
Prerequisites
- A GitHub account with the repository pushed to GitHub
- Node.js 18 or later installed locally (only required for Option 2 with a custom dev environment)
- The repository must be public, or your account must have a GitHub Pro / Team plan for private-repo Pages
Option 1: Deploy from the Existing Repo (Instant)
Since all built files are already committed to the repo root, you can enable GitHub Pages with no build step at all.Open repository Settings
Navigate to your repository on GitHub and click the Settings tab in the top navigation.
Configure the Pages source
In the left sidebar, click Pages. Under Build and deployment, set:
- Source:
Deploy from a branch - Branch:
main - Folder:
/ (root)
.nojekyll file already committed to the repo root ensures GitHub does not run Jekyll processing, which would otherwise interfere with the asset paths in index.html.
Option 2: GitHub Actions Workflow (Automated)
For a workflow where you modify source files and want automated deploys on every push, use a GitHub Actions pipeline that installs dependencies, builds the project, and publishes thedist/ output.
This option requires a local Vite + Tailwind development environment with a
package.json and vite.config.js. Neither file is committed to the repo — the repo contains pre-built output only. You must set up your own dev environment before this workflow will function. See the deployment overview for scaffolding steps, and the Tailwind Config page for the example Tailwind configuration.main will trigger a fresh build and deploy automatically.
SPA Routing Fix
The.nojekyll file handles Jekyll interference, but there is a second problem: React Router’s BrowserRouter uses the HTML5 History API, meaning URLs like /blog and /skills are not real files on disk. When GitHub Pages receives a request for /blog it returns a 404 because no blog/index.html exists.
The standard workaround is a 404.html that captures the requested URL and redirects back to index.html, where React Router takes over and renders the correct route.
Step 1 — Create 404.html in the repo root (for the pre-built deploy) or in public/ (for a Vite build setup):
index.html just before the closing </body> tag:
404.html, which saves the original URL to sessionStorage and immediately redirects to the app root. Once index.html loads, the inline script reads the saved URL from sessionStorage and uses history.replaceState to restore it — React Router then renders the correct page without a visible redirect.
Custom Domain
To use your own domain (e.g.www.yourdomain.com) instead of the default github.io subdomain:
Configure your DNS
With your domain registrar or DNS provider, add a
CNAME record pointing www to your-username.github.io. For an apex domain, add A records pointing to GitHub’s Pages IPs (listed in GitHub’s documentation).