Skip to content

Commit 2e6c252

Browse files
committed
Update GH CI workflow to conditionally run migrations
1 parent bf35ac0 commit 2e6c252

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

.github/workflows/fly-deploy.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@v4
2525
- uses: superfly/flyctl-actions/setup-flyctl@master
26-
- run: flyctl ssh console -C 'python manage.py migrate'
26+
- run: |
27+
# if /data is present, then it is implied that we are using a storage volume, and we should run migrations
28+
if [ -d "/data" ]; then
29+
flyctl ssh console -C 'python manage.py migrate'
30+
fi
31+
shell: bash
2732
env:
2833
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

0 commit comments

Comments
 (0)