added db setup to deployment file
This commit is contained in:
@@ -11,6 +11,13 @@ name: Deploy
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
run_setup_db:
|
||||
description: "Run deploy/setup_db.sh to configure DB and run migrations"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -76,7 +83,12 @@ jobs:
|
||||
git pull origin main
|
||||
source .venv/bin/activate
|
||||
pip install -e .
|
||||
if [ "${{ inputs.run_setup_db }}" = "true" ] || [ "${{ github.event.inputs.run_setup_db }}" = "true" ]; then
|
||||
chmod +x deploy/setup_db.sh
|
||||
./deploy/setup_db.sh
|
||||
else
|
||||
alembic upgrade head
|
||||
fi
|
||||
cd frontend
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
Reference in New Issue
Block a user