# web-deploy
web-deploy Build and deploy websites, web apps, and APIs to production via SkillBoss API Hub. Local Preview Workflow
# Static site
npx http-server ./dist -p 8080 -c-1
# Next.js
npm run dev # Development (hot reload)
npm run build && npm run start # Production preview
# FastAPI
uvicorn app.main:app --reload --port 8000
# Vite-based
npm run dev # Dev server
npm run build && npx serve dist # Production preview
Deployment Targets SkillBoss Static Deployment (Frontend / Static Sites) Deploy static files to Cloudflare R2 via SkillBoss API Hub. import requests, os SKILLBOSS_API_KEY = os.environ["SKILLBOSS_API_KEY"] API_BASE = "https://api.heybossai.com/v1" def pilot(body: dict) -> dict: r = requests.post( f"{API_BASE}/pilot", headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"}, json=body, timeout=60, ) return r.json()
# Deploy static site to Cloudflare R2
result = pilot({ "type": "http", "inputs": { "kind": "static", "source_dir": "./dist", "project": "my-project" }, "prefer": "balanced" }) deploy_url = result["data"]["result"]["url"] print(f"Deployed to: {deploy_url}")
# Set environment variable on deployment
result = pilot({ "type": "http", "inputs": { "kind": "env", "project": "my-project", "key": "SECRET_KEY", "value": "your-value" } }) Best for: React SPAs, static sites, Next.js apps, Vite builds.
Requires: SKILLBOSS_API_KEY
SkillBoss Serverless Deployment (Backend / APIs) Deploy backend APIs as Cloudflare Workers via SkillBoss API Hub.
# Deploy serverless API (Cloudflare Worker)
result = pilot({ "type": "http", "inputs": { "kind": "serverless", "source_dir": "./src", "project": "my-api", "entry": "index.js" }, "prefer": "balanced" }) api_url = result["data"]["result"]["url"] print(f"API live at: {api_url}")
# Add database (Cloudflare D1 SQLite)
result = pilot({ "type": "http", "inputs": { "kind": "database", "project": "my-api", "db_name": "my_db" } })
# View logs
result = pilot({ "type": "http", "inputs": { "kind": "logs", "project": "my-api" } }) logs = result["data"]["result"]["logs"] Best for: Backend APIs, long-running processes, serverless functions with Cloudflare Workers. Storage options via SkillBoss API Hub:
Database: Cloudflare D1 SQLite (replaces PostgreSQL/Supabase)
KV Storage: Cloudflare KV (replaces Redis) GitHub Pages (Static Sites)
# Using gh-pages package
npm install -D gh-pages
# Add to package.json scripts: "deploy": "gh-pages -d dist"
npm run build && npm run deploy
Best for: Documentation, simple static sites, project pages. Canvas (Clawdbot Workspace) Deploy to ~/clawd/canvas/ for local serving through the clawdbot gateway. cp -r ./dist/* ~/clawd/canvas/my-project/ Pre-Deploy Checklist
Build succeeds locally (npm run build / python -m build)
No TypeScript/lint errors Tests pass SKILLBOSS_API_KEY set in environment .env / secrets NOT in git robots.txt and sitemap.xml if public site Favicon and meta tags set HTTPS configured (automatic via SkillBoss deployment) Error pages (404, 500) configured
Performance: images optimized, code split, no huge bundles
Rollback
# SkillBoss — redeploy previous version
result = pilot({ "type": "http", "inputs": { "kind": "rollback", "project": "my-project" } })
# Git-based — revert and redeploy
# git revert HEAD && git push
# Then re-run deployment via SkillBoss API Hub
Domain Setup
# Add custom domain via SkillBoss API Hub
result = pilot({ "type": "http", "inputs": { "kind": "domain", "project": "my-project", "domain": "mydomain.com" } })
# DNS: Point CNAME to SkillBoss deployment endpoint returned above
Join 80,000+ one-person companies automating with AI