Generic Static Hosting
Introduction
ReeWeb's output is standard static HTML - no server-side rendering, no runtime, no database. Any web server or static host can serve it. This page covers the most common alternatives to Cloudflare Pages.
Netlify
Netlify is a popular static hosting platform with its own _redirects support (same format as Cloudflare).
Git Integration
- Push your project to GitHub/GitLab/Bitbucket
- Go to app.netlify.com → Add new site → Import an existing project
- Select your repository
- Configure:
| Setting | Value |
|---|---|
| SSG command | bun ssg |
| Publish directory | dist |
| Environment variables | Add SITE_URL=https://yourdomain.com |
Netlify supports Bun natively - no need to specify a Node.js version.
Manual Upload
bun ssg
# zip dist/ and upload via Netlify UI
Vercel
Vercel is another zero-config option:
- Push to GitHub
- Import in the Vercel Dashboard
- Vercel auto-detects the project structure
Set SITE_URL in the Vercel project environment variables. The framework preset is "Other" - Vercel serves static files from dist/.
GitHub Pages
For free hosting on public repositories. GitHub's current recommendation is to generate the site in a workflow and deploy with the official Pages actions (upload-pages-artifact + deploy-pages) - this replaces the older approach of pushing the generated output to a gh-pages branch with a third-party action.
First, in your repository settings under Settings → Pages → Build and deployment, set Source to GitHub Actions. Then add the workflow:
# .github/workflows/deploy.yml
name: Deploy to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment, cancelling in-progress runs.
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install
- run: bun ssg
env:
SITE_URL: https://username.github.io
- uses: actions/configure-pages@v5
- uses: actions/upload-pages-artifact@v3
with:
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v4
The permissions and id-token: write block is required - the official deploy action authenticates via OIDC, not a GITHUB_TOKEN push. No gh-pages branch is created; the artifact is deployed directly.
If your site is served from a subpath (e.g.
https://username.github.io/repo/rather than a custom domain at the root), setSITE_URLto that full base URL so links and hreflang tags resolve correctly.
S3 + CloudFront
For full control over infrastructure:
- Generate:
bun ssg - Upload
dist/to an S3 bucket:
aws s3 sync dist/ s3://my-site-bucket/ --delete
- Configure the bucket for static website hosting
- Place CloudFront in front of the bucket for HTTPS and CDN
The _redirects file doesn't work with S3 directly - you'll need to configure CloudFront Functions or Lambda@Edge to handle redirects, or use S3's own routing rules.
nginx on a VPS
server {
listen 80;
server_name example.com;
root /var/www/my-site/dist;
# Directory index
index index.html;
# Pretty URLs - serve index.html for directory paths
location / {
try_files $uri $uri/ =404;
}
# Gzip
gzip on;
gzip_types text/html text/css application/javascript image/svg+xml;
# Cache static assets
location ~* \.(css|js|ico|svg|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
}
}
For automatic builds on push, set up a GitHub Action that SSH-es into the VPS, pulls the latest code, and rebuilds.