+
Skip to content

Update existing OpenAI and Anthropic instrumentation to match 1.37.0 #2678

Update existing OpenAI and Anthropic instrumentation to match 1.37.0

Update existing OpenAI and Anthropic instrumentation to match 1.37.0 #2678

Workflow file for this run

name: Deploy PR Preview
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
deploy-preview:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Create Neon Branch
id: create-branch
uses: neondatabase/create-branch-action@v5
with:
username: ${{ vars.NEON_USERNAME }}
project_id: ${{ vars.NEON_PROJECT_ID }}
parent: staging
branch_name: preview/pr-${{ github.event.number }}
api_key: ${{ secrets.NEON_API_KEY }}
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Run database migrations
run: bun run db:migrate
env:
DATABASE_URL: ${{ steps.create-branch.outputs.db_url }}
- name: Build for PR
run: bun run build
env:
CLOUDFLARE_ENV: pr-${{ github.event.number }}
- name: Create wrangler.toml for PR
run: |
cat > wrangler.pr.toml << EOF
name = "lilypad-pr-${{ github.event.number }}"
compatibility_date = "2025-06-17"
compatibility_flags = ["nodejs_compat"]
main = "worker/index.ts"
[assets]
directory = "dist/client"
not_found_handling = "single-page-application"
run_worker_first = ["/api/*", "/auth/*", "/docs", "/openapi.json"]
[observability]
enabled = true
[vars]
ENVIRONMENT = "preview"
SITE_URL = "https://lilypad-pr-${{ github.event.number }}.mirascope.workers.dev"
GITHUB_CLIENT_ID = "Ov23lim6U7I6fihGO7Ys"
GITHUB_CALLBACK_URL = "https://staging.lilypad.mirascope.com/auth/github/proxy-callback"
GOOGLE_CLIENT_ID = "852098976648-nvi9po6sgebbn50ekha2h25lnf56ko40.apps.googleusercontent.com"
GOOGLE_CALLBACK_URL = "https://staging.lilypad.mirascope.com/auth/google/proxy-callback"
EOF
- name: Deploy to Cloudflare Workers
id: deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: deploy --config wrangler.pr.toml
postCommands: |
echo "*** Setting Preview Worker Secrets ***"
echo "${{ steps.create-branch.outputs.db_url }}" | bunx wrangler secret put DATABASE_URL --name lilypad-pr-${{ github.event.number }}
echo "${{ secrets.STAGING_GITHUB_CLIENT_SECRET }}" | bunx wrangler secret put GITHUB_CLIENT_SECRET --name lilypad-pr-${{ github.event.number }}
echo "${{ secrets.STAGING_GOOGLE_CLIENT_SECRET }}" | bunx wrangler secret put GOOGLE_CLIENT_SECRET --name lilypad-pr-${{ github.event.number }}
- name: Comment PR with preview URL
uses: thollander/actions-comment-pull-request@v3
with:
message: |
## 🚀 Preview Deployment
Your changes have been deployed to a preview environment:
**Preview URL:** https://lilypad-pr-${{ github.event.number }}.mirascope.workers.dev
**Database Branch:** `preview/pr-${{ github.event.number }}`
---
*Last updated: ${{ github.event.pull_request.updated_at }} (Commit: ${{ github.sha }})*
comment-tag: execution
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载