Skip to content

Commit fb15ee0

Browse files
authored
chore(ci): run ci on staging + migrations (#575)
1 parent 3455c3c commit fb15ee0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, staging]
66
pull_request:
7-
branches: [main]
7+
branches: [main, staging]
88

99
jobs:
1010
test:
@@ -56,7 +56,7 @@ jobs:
5656
migrations:
5757
name: Apply Database Migrations
5858
runs-on: ubuntu-latest
59-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
59+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
6060
needs: test
6161
steps:
6262
- name: Checkout code
@@ -73,5 +73,5 @@ jobs:
7373
- name: Apply migrations
7474
working-directory: ./apps/sim
7575
env:
76-
DATABASE_URL: ${{ secrets.DATABASE_URL }}
76+
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
7777
run: bunx drizzle-kit push

0 commit comments

Comments
 (0)