Skip to content

Commit 9dae199

Browse files
cteutarn
authored andcommitted
Migrate evals database when deploying roo-code-website (RooCodeInc#6146)
Evals db migrate
1 parent 60ee62f commit 9dae199

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

.github/workflows/website-deploy.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'apps/web-roo-code/**'
8+
- "apps/web-roo-code/**"
99
workflow_dispatch:
1010

1111
env:
@@ -21,11 +21,11 @@ jobs:
2121
- name: Check if VERCEL_TOKEN exists
2222
id: check
2323
run: |
24-
if [ -n "${{ secrets.VERCEL_TOKEN }}" ]; then
25-
echo "has-vercel-token=true" >> $GITHUB_OUTPUT
26-
else
27-
echo "has-vercel-token=false" >> $GITHUB_OUTPUT
28-
fi
24+
if [ -n "${{ secrets.VERCEL_TOKEN }}" ]; then
25+
echo "has-vercel-token=true" >> $GITHUB_OUTPUT
26+
else
27+
echo "has-vercel-token=false" >> $GITHUB_OUTPUT
28+
fi
2929
3030
deploy:
3131
runs-on: ubuntu-latest
@@ -36,6 +36,11 @@ jobs:
3636
uses: actions/checkout@v4
3737
- name: Setup Node.js and pnpm
3838
uses: ./.github/actions/setup-node-pnpm
39+
- name: Migrate evals database
40+
run: pnpm db:migrate:production
41+
working-directory: packages/evals
42+
env:
43+
DATABASE_URL: ${{ secrets.EVALS_DATABASE_URL }}
3944
- name: Install Vercel CLI
4045
run: npm install --global vercel@canary
4146
- name: Pull Vercel Environment Information

packages/evals/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
"drizzle-kit:production": "dotenvx run -f .env.production -- tsx node_modules/drizzle-kit/bin.cjs",
1616
"db:generate": "pnpm drizzle-kit generate",
1717
"db:migrate": "pnpm drizzle-kit migrate",
18-
"db:push": "pnpm drizzle-kit push",
19-
"db:test:push": "pnpm drizzle-kit:test push",
20-
"db:production:push": "pnpm drizzle-kit:production push",
18+
"db:migrate:production": "pnpm drizzle-kit:production migrate",
19+
"db:push:test": "pnpm drizzle-kit:test push",
2120
"db:up": "dotenvx run -f .env.development .env.local -- docker compose up -d db",
2221
"db:down": "dotenvx run -f .env.development .env.local -- docker compose down db",
2322
"redis:up": "dotenvx run -f .env.development .env.local -- docker compose up -d redis",

packages/evals/src/db/migrations/0001_add_timeout_to_runs.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)