xtrace 0.0.15

An AI observability service for collecting, storing, and querying traces, spans, and metrics across LLM and agent workflows.
Documentation
name: Deploy Docs to Cloudflare Pages

on:
  push:
    branches: [main]
    paths:
      - 'www/**'
      - '.github/workflows/deploy-docs.yml'
  workflow_dispatch:

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      deployments: write

    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
          cache-dependency-path: www/package-lock.json

      - name: Install dependencies
        working-directory: www
        run: npm ci

      - name: Build VitePress
        working-directory: www
        run: npm run build

      - name: Create Cloudflare Pages project (if not exists)
        run: |
          curl -sS -X POST \
            "https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/pages/projects" \
            -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
            -H "Content-Type: application/json" \
            -d '{"name":"xtrace-docs","production_branch":"main"}' \
            | grep -q '"success":true' || true
        env:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
        continue-on-error: true

      - name: Deploy to Cloudflare Pages
        run: npx wrangler@latest pages deploy www/.vitepress/dist --project-name=xtrace-docs --commit-dirty=true
        env:
          CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
          CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}