Skip to content

Commit ad24db9

Browse files
committed
CI: run D1 migrations before worker deploy
1 parent 50b9e57 commit ad24db9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ jobs:
1818
- name: Install dependencies
1919
run: cd worker && npm install
2020

21+
- name: Migrate D1 (schema.sql)
22+
run: cd worker && npx wrangler d1 execute basemail-db --file=src/db/schema.sql
23+
env:
24+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
25+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
26+
2127
- name: Deploy Worker
2228
run: cd worker && npx wrangler deploy
2329
env:

0 commit comments

Comments
 (0)