Skip to content

docs: rewrite API reference — slim, pragmatic, base URL first #33

docs: rewrite API reference — slim, pragmatic, base URL first

docs: rewrite API reference — slim, pragmatic, base URL first #33

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- name: Verify
run: bun run verify
deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: verify
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- run: bun install
- name: Create Vectorize index (if needed)
run: |
bunx wrangler vectorize create deja-embeddings --dimensions 384 --metric cosine || echo "Index may already exist"
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Build marketing site
run: cd marketing && bun install && bun run build
- name: Deploy to Cloudflare
run: bunx wrangler deploy
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
- name: Set Worker secrets
run: echo "${{ secrets.DEJA_API_KEY }}" | bunx wrangler secret put API_KEY
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}