Skip to content

Commit 6d2a853

Browse files
committed
fix(ci): use proper D1 migration tracking instead of raw SQL execution
1 parent 7bce84f commit 6d2a853

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,7 @@ jobs:
2929
env:
3030
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
3131
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
32-
run: |
33-
for migration in migrations/*.sql; do
34-
if [ -f "$migration" ]; then
35-
echo "::group::Migration: $migration"
36-
if wrangler d1 execute openboot --remote --file="$migration" 2>&1; then
37-
echo "Migration applied successfully"
38-
else
39-
echo "Migration skipped (already applied or error)"
40-
fi
41-
echo "::endgroup::"
42-
fi
43-
done
32+
run: wrangler d1 migrations apply openboot --remote
4433

4534
- name: Deploy
4635
uses: cloudflare/wrangler-action@v3

0 commit comments

Comments
 (0)