added db setup to deployment file
This commit is contained in:
@@ -11,6 +11,13 @@ name: Deploy
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
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:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
@@ -76,7 +83,12 @@ jobs:
|
|||||||
git pull origin main
|
git pull origin main
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
pip install -e .
|
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
|
alembic upgrade head
|
||||||
|
fi
|
||||||
cd frontend
|
cd frontend
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
Reference in New Issue
Block a user