Deploying your docs site
InfoEmu static hosting gives you two ways in: upload a built site (you
build wherever you like — locally, in CI — and upload the rendered files), or
send raw Markdown (POST /api/deploy/{id}/source, or a connected GitHub
repo) and InfoEmu builds it for you in an isolated sandbox. Either way, every
deploy becomes an immutable release that goes live atomically, and you can
roll back at any time.
1. Get a deploy token
Section titled “1. Get a deploy token”In your dashboard, open your static/docs site and create a deploy token. Tokens look like:
dpl_<id>.<secret>The full token is shown once — store it in your CI secret store immediately. Each token is scoped to exactly one site; a token for site A can never deploy to site B. You can revoke a token and mint a new one at any time.
2. Build
Section titled “2. Build”pnpm installpnpm buildThis renders the site into dist/.
3. Deploy
Section titled “3. Deploy”This starter ships a deploy.sh at the repo root:
DEPLOY_URL=https://portal.infoemu.com \INSTANCE_ID=<your-site-id> \DEPLOY_TOKEN=dpl_... \./deploy.shThe script tars dist/ and posts it to the deploy API. Add --dry-run to see
exactly what would be uploaded (and the request that would be made) without
deploying.
The deploy API
Section titled “The deploy API”If you’d rather call the API directly (for example from CI), it is three
endpoints, all authenticated with Authorization: Bearer <deploy token>:
Publish a release
Section titled “Publish a release”tar -czf site.tar.gz -C dist .curl -sS -X POST \ -H "Authorization: Bearer $DEPLOY_TOKEN" \ -F "archive=@site.tar.gz" \ "$DEPLOY_URL/api/deploy/$INSTANCE_ID"# → 201 {"instance_id": "...", "release": "20260707T120000Z-ab12cd34", "files": 42}The archive must contain your site files at its root (index.html, not
dist/index.html) as regular files — symlinks and special files are
rejected. Limits: 200 MiB compressed upload, 512 MiB uncompressed,
50,000 files.
List releases
Section titled “List releases”curl -sS -H "Authorization: Bearer $DEPLOY_TOKEN" \ "$DEPLOY_URL/api/deploy/$INSTANCE_ID/releases"Shows the releases kept on disk and which one is currently live.
Roll back
Section titled “Roll back”curl -sS -X POST -H "Authorization: Bearer $DEPLOY_TOKEN" \ "$DEPLOY_URL/api/deploy/$INSTANCE_ID/rollback"Atomically re-points the live site at the previous release (or answers
409 if there is no previous release yet). deploy.sh --rollback wraps this
call.
Troubleshooting
Section titled “Troubleshooting”- 401 — missing, revoked, or wrong token. Mint a new token from the dashboard. See Deploy returns 401.
- 400 “Invalid upload” — the archive contains symlinks, absolute paths, or
..traversal; ship plain files only. - 404 — the
INSTANCE_IDin the URL doesn’t match the site your token belongs to. - 409 — the site isn’t ready to receive deploys yet, or (on rollback) there’s no previous release.
- 413 — the compressed upload exceeds 200 MiB.