Rift Logo RiftJS

Deploying Rift to Netlify

Netlify is a popular platform for static site hosting, offering free CI/CD, custom domains, and instant rollbacks. It works seamlessly with Rift's static output.

Steps

  1. Push your Rift project to a Git provider (GitHub, GitLab, Bitbucket).
  2. Go to app.netlify.com and click New site from Git.
  3. Connect your repository and select your Rift project.
  4. Set build settings:
    • Build command: npm run build
    • Publish directory: dist
  5. Click Deploy site. Netlify will build and deploy your site to a .netlify.app domain.
  6. (Optional) Add a custom domain in Site settings → Domain management.

Tips

  • Ensure 404.html is present at the root of dist/ for proper error handling.
  • Netlify redeploys automatically on every push to your main branch.
SettingValue
Build commandnpm run build
Publish directorydist
Default domain*.netlify.app
Free HTTPS✅ Yes
Auto redeploys✅ Yes

Deploying Rift to GitHub Pages

GitHub Pages is a free static hosting service for open source projects and documentation. It serves your static site directly from a GitHub repository branch.

Steps

  1. Build your Rift site: npm run build
  2. Push the contents of dist/ to a gh-pages branch (or docs/ folder for user/organization sites).
  3. In your repository settings, set GitHub Pages to use the gh-pages branch (or docs/ folder).
  4. Visit your site at https://<username>.github.io/<repo>/

Tips

  • Ensure 404.html is present at the root of dist/ for error handling.
  • Use a tool like gh-pages npm package for easy deployment.
SettingValue
Branch/foldergh-pages or docs/
Default domain*.github.io
Free HTTPS✅ Yes
Auto redeploysManual or via GitHub Actions

Deploying Rift to Vercel (Static Mode)

Vercel is optimized for frontend apps and offers fast static hosting with preview deployments, custom domains, and global CDN.

Steps

  1. Push your Rift project to GitHub, GitLab, or Bitbucket.
  2. Go to vercel.com and import your repository.
  3. Set build settings:
    • Framework preset: Other
    • Build command: npm run build
    • Output directory: dist
  4. Deploy your site. Vercel will build and publish to a .vercel.app domain.
  5. (Optional) Add a custom domain in Project settings.

Tips

  • Ensure 404.html is present at the root of dist/.
  • Disable SSR and use static output for best results.
SettingValue
Framework presetOther
Build commandnpm run build
Output directorydist
Default domain*.vercel.app
Free HTTPS✅ Yes
Auto redeploys✅ Yes

Deploying Rift to Render

Render offers simple static site hosting with free custom domains, HTTPS, and automatic deploys from Git.

Steps

  1. Push your Rift project to GitHub or GitLab.
  2. Go to render.com and create a new Static Site.
  3. Connect your repository and select your Rift project.
  4. Set build settings:
    • Build command: npm run build
    • Publish directory: dist
  5. Deploy your site. Render will build and publish to a .onrender.com domain.
  6. (Optional) Add a custom domain in Site settings.

Tips

  • Ensure 404.html is present at the root of dist/.
SettingValue
Build commandnpm run build
Publish directorydist
Default domain*.onrender.com
Free HTTPS✅ Yes
Auto redeploys✅ Yes

Self-Hosting Rift Sites

You can host your Rift site on your own infrastructure for maximum control. Serve the dist/ directory using any static file server.

Options

  • VPS or Linux server: Use nginx or caddy to serve static files.
  • Docker: Use nginx:alpine to serve dist/ in a container.
  • Cloud storage: Host on S3, CloudFront, or similar.
  • IPFS or CDN: Distribute via decentralized or CDN gateways.

Local Preview

Test your static output locally before deploying:

npx serve dist/
python3 -m http.server --directory dist

Tips

  • Make sure 404.html is present at the root of dist/.
  • Configure caching and headers for best performance.