Documentation
Deploy a static site
Deploy React, Vue, Svelte, Astro, Hugo, Jekyll or plain HTML static sites for free on Rebasable.
Static sites are always free. We build your site, then serve the files from our edge with HTTPS, compression and caching. Static sites never sleep.
Create one
New → Static site, choose the repository, then set:
| Framework | Build command | Publish directory |
|---|---|---|
| Vite (React, Vue, Svelte) | npm ci && npm run build |
dist |
| Create React App | npm ci && npm run build |
build |
| Next.js static export | npm ci && npm run build |
out |
| Astro | npm ci && npm run build |
dist |
| Hugo | hugo --minify |
public |
| Jekyll | bundle exec jekyll build |
_site |
| Plain HTML | (empty) | . |
From the CLI:
rebasable services create my-site --type static --build-cmd "npm ci && npm run build" --publish-dir dist
Single-page apps
For client-side routing, add a rewrite of /* to /index.html in Settings → Redirects and rewrites, so deep links like /settings/profile load your app.
Headers
Add custom response headers (for example Cache-Control for /assets/* or security headers for /*) in Settings → Headers.
Environment variables
Variables are available at build time only (for example VITE_API_URL). Never put secrets in a static site: everything ends up in the browser.
Preview environments
Enable pull request previews to get a URL for every PR.