Skip to content

Deploying

Deploying Documentation

Skrypt outputs a standard Next.js application. You can deploy it anywhere that runs Node.js, or use Skrypt's built-in hosting for a zero-config deployment.

Deploy to a *.skrypt.sh subdomain with a single command:

Terminal
skrypt deploy

This builds your site, uploads it, and gives you a live URL at your-project.skrypt.sh. Custom domains are free.

Set a project slug

Terminal
skrypt deploy --project my-library
# → https://my-library.skrypt.sh

Authentication

Terminal
skrypt login
skrypt deploy

Or pass a token directly:

Terminal
skrypt deploy --token $SKRYPT_API_KEY

Self-hosting

Since the output is a Next.js app, you can deploy to any Node.js hosting platform.

Vercel

Terminal
cd docs
npx vercel --prod

Or connect the docs/ directory to Vercel via GitHub for automatic deployments on every push.

Netlify

Terminal
cd docs
npm run build
npx netlify deploy --prod --dir=.next

Docker

FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM node:20-alpine
WORKDIR /app
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
COPY --from=builder /app/package*.json ./
RUN npm ci --production
EXPOSE 3000
CMD ["npm", "start"]
dockerfile

Static export

For static hosting (GitHub Pages, S3, Cloudflare Pages):

Terminal
cd docs
npm run build
# Output in .next/ — upload to your static host

CI/CD

GitHub Actions

Generate a workflow file:

Terminal
skrypt gh-action

This creates .github/workflows/docs.yml that:

  1. Runs skrypt test and skrypt qa --strict on pull requests
  2. Builds and deploys on merge to main

Manual workflow

name: Documentation
on:
  push:
    branches: [main]
    paths: ["src/**", "docs/**"]

jobs:
  docs:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm install -g skrypt-ai
      - run: skrypt generate ./src -o ./docs/content/docs --public-only
      - run: skrypt test ./docs/content/docs --fix
      - run: skrypt qa ./docs/content/docs --strict
      - run: cd docs && npm ci && npm run build
      - run: skrypt deploy --token ${{ secrets.SKRYPT_API_KEY }}
YAML

Automated refresh

Keep documentation in sync with code changes:

Terminal
# Watch for changes and regenerate
skrypt watch ./src -o ./content/docs

# Or set up a cron job via GitHub Actions
skrypt cron

The refresh command detects what changed since the last generation and only regenerates affected pages — saving ~95% of LLM cost on incremental updates:

Terminal
skrypt refresh ./src --docs ./content/docs
Was this helpful?