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.
Skrypt hosting (recommended)
Deploy to a *.skrypt.sh subdomain with a single command:
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
skrypt deploy --project my-library
# → https://my-library.skrypt.sh
Authentication
skrypt login
skrypt deploy
Or pass a token directly:
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
cd docs
npx vercel --prod
Or connect the docs/ directory to Vercel via GitHub for automatic deployments on every push.
Netlify
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"]
Static export
For static hosting (GitHub Pages, S3, Cloudflare Pages):
cd docs
npm run build
# Output in .next/ — upload to your static host
CI/CD
GitHub Actions
Generate a workflow file:
skrypt gh-action
This creates .github/workflows/docs.yml that:
- Runs
skrypt testandskrypt qa --stricton pull requests - 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 }}
Automated refresh
Keep documentation in sync with code changes:
# 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:
skrypt refresh ./src --docs ./content/docs