⚠️Early Alpha — Org-press is experimental. Perfect for hackers and tinkerers, not ready for production. Documentation may be incomplete or inaccurate.
⚠️ Untested Documentation
These deployment instructions are conceptual and have not been fully tested. The general approach should work since org-press outputs standard static files, but specific configurations may need adjustment. Contributions and corrections are welcome!

Deploying

Org-press builds to static HTML that can be hosted anywhere.

Build First

orgp build

Your site is in dist/ (or your configured output directory).

Netlify

Via Web UI

  1. Push your code to GitHub/GitLab
  2. Connect repository in Netlify
  3. Set build settings:
    • Build command: npm run build
    • Publish directory: dist

Via netlify.toml

# netlify.toml
[build]
  command = "npm run build"
  publish = "dist"

[build.environment]
  NODE_VERSION = "20"

Redirects for SPA

If using client-side routing:

[[redirects]]
  from = "/*"
  to = "/index.html"
  status = 200

Vercel

Via Web UI

  1. Import your repository
  2. Framework: Other
  3. Build command: npm run build
  4. Output directory: dist

Via vercel.json

{
  "buildCommand": "npm run build",
  "outputDirectory": "dist",
  "framework": null
}

GitHub Pages

Using GitHub Actions

Create .github/workflows/deploy.yml:

name: Deploy to GitHub Pages

on:
  push:
    branches: [main]

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm

      - run: npm ci
      - run: npm run build

      - 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:
      - uses: actions/deploy-pages@v4
        id: deployment

Base Path for Project Pages

If deploying to https://username.github.io/repo-name/:

// .org-press/config.ts
export default {
  base: "/repo-name/",
};

Cloudflare Pages

Via Web UI

  1. Connect your Git repository
  2. Build settings:
    • Framework: None
    • Build command: npm run build
    • Build output directory: dist

Via wrangler.toml

name = "my-docs"
compatibility_date = "2024-01-01"

[site]
bucket = "./dist"

AWS S3 + CloudFront

Upload to S3

# Build
npm run build

# Sync to S3
aws s3 sync dist/ s3://my-bucket-name --delete

CloudFront Configuration

  1. Create a CloudFront distribution
  2. Set origin to your S3 bucket
  3. Configure error pages (404 → /index.html for SPA)

Docker / Self-Hosted

Nginx

FROM nginx:alpine
COPY dist/ /usr/share/nginx/html/
COPY nginx.conf /etc/nginx/conf.d/default.conf
# nginx.conf
server {
    listen 80;
    root /usr/share/nginx/html;
    index index.html;

    location / {
        try_files $uri $uri/ $uri.html /index.html;
    }

    # Cache static assets
    location /assets/ {
        expires 1y;
        add_header Cache-Control "public, immutable";
    }
}

Node.js Server

// server.js
import express from 'express';
import { fileURLToPath } from 'url';
import { dirname, join } from 'path';

const __dirname = dirname(fileURLToPath(import.meta.url));
const app = express();

app.use(express.static(join(__dirname, 'dist')));

app.get('*', (req, res) => {
  res.sendFile(join(__dirname, 'dist', 'index.html'));
});

app.listen(3000);

Any Static Host

Just upload the dist/ folder:

# Using rsync
rsync -avz dist/ user@server:/var/www/html/

# Using scp
scp -r dist/* user@server:/var/www/html/

# Using FTP
lftp -c "mirror -R dist/ /public_html/"

Environment Variables

For different environments, use separate config files or environment variables:

// .org-press/config.ts
export default {
  base: process.env.BASE_URL || "/",
  // Other environment-specific settings
};

Deployment Checklist

Before deploying:

  • Run orgp build locally and test
  • Check all links work
  • Verify base path is correct
  • Test on orgp preview
  • Check mobile responsiveness
  • Verify SEO metadata (titles, descriptions)

See Also