Skip to Content
Framework GuidesStatic Sites

Deploy Static Sites

Deploy HTML, CSS, and JavaScript sites (React SPA, Vue SPA, plain HTML, etc.).

1. Initialize

cd my-static-site ghayma init

Plain HTML

.ghayma.json
{ "name": "my-site", "framework": "static", "build_command": "", "start_command": "", "port": 80 }

React (Create React App / Vite)

.ghayma.json
{ "name": "my-react-app", "framework": "static", "build_command": "npm run build", "start_command": "", "output_directory": "dist", "port": 80 }

Vue (Vite)

.ghayma.json
{ "name": "my-vue-app", "framework": "static", "build_command": "npm run build", "start_command": "", "output_directory": "dist", "port": 80 }

2. Deploy

ghayma deploy

Static sites are served via nginx with automatic gzip compression, caching headers, and SPA fallback routing (all routes serve index.html).

Custom Domain

ghayma domain create my-site.com

Point the hostname at Ghayma with a single A record and no AAAA (IPv6) record — Ghayma is IPv4-only, and a stray AAAA from a previous host blocks the certificate. See Domains for the DNS settings.