stx deploy
Deploy your documentation to Syntext's global CDN with automatic SSL and instant cache invalidation.
Usage
stx deploy [options]
Options
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--preview |
-p |
boolean | false |
Create a preview deployment |
--branch |
-b |
string | current branch | Branch name for preview URL |
--message |
-m |
string | git commit message | Deployment message |
--skip-build |
boolean | false |
Deploy existing dist/ folder |
|
--wait |
boolean | true |
Wait for deployment to complete |
Examples
Production Deployment
stx deploy
Deploys to your production URL (e.g., your-project-docs.syntext.dev).
Preview Deployment
stx deploy --preview
Creates a unique preview URL like preview-abc123-docs.syntext.dev.
Branch Preview
stx deploy --preview --branch feature/new-api
Creates a branch-specific preview at feature-new-api-docs.syntext.dev.
Skip Build
If you've already run stx build:
stx deploy --skip-build
Deployment Output
stx deploy
Building documentation...
✓ Build complete (2.1s)
Deploying to Syntext...
↑ Uploading 47 files (4.2 MB)
✓ Uploaded in 1.3s
⟳ Invalidating cache...
✓ Cache invalidated
Deployment complete!
Production: https://your-project-docs.syntext.dev
Dashboard: https://syntext.dev/dashboard/projects/your-project
Deployed by josh at 2024-01-15 12:34:56 UTC
Default Domain
Every project gets a free subdomain:
{project-slug}-docs.syntext.dev
The slug is derived from your project name. For example, "My API" becomes my-api-docs.syntext.dev.
Custom Domains
Add a custom domain in the dashboard:
- Go to Project Settings → Domains
- Add your domain (e.g.,
docs.yourcompany.com) - Configure DNS:
CNAME docs → proxy.syntext.dev - SSL certificate is provisioned automatically
Custom domains require the Pro plan. See pricing for details.
Preview Deployments
Preview deployments are useful for:
- PR reviews — Review doc changes before merging
- Staging — Test with production-like environment
- Client feedback — Share work-in-progress with stakeholders
Preview URLs expire after 30 days of inactivity.
CI/CD Integration
GitHub Actions
name: Deploy Docs
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install stx
run: curl -fsSL https://get.syntext.dev | sh
- name: Deploy
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
stx deploy --preview --branch ${{ github.head_ref }}
else
stx deploy
fi
env:
SYNTEXT_API_KEY: ${{ secrets.SYNTEXT_API_KEY }}
GitLab CI
deploy:
image: oven/bun:latest
script:
- curl -fsSL https://get.syntext.dev | sh
- stx deploy
only:
- main
variables:
SYNTEXT_API_KEY: $SYNTEXT_API_KEY
Authentication
Deployments require authentication. Set your API key:
export SYNTEXT_API_KEY=stx_abc12345_...
Get your API key from the dashboard.
Rollbacks
If a deployment causes issues, rollback from the dashboard:
- Go to Project → Deployments
- Find the previous working deployment
- Click Rollback to this version
Or via CLI:
stx rollback --deployment dpl_abc123
CDN Architecture
Syntext uses Cloudflare's global network:
- 300+ edge locations worldwide
- < 50ms TTFB in most regions
- Automatic compression (gzip, brotli)
- HTTP/3 support
- DDoS protection included
Static assets are cached indefinitely with content-based hashes. HTML pages are cached with instant purge on deploy.