diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index 3d0c326..7632467 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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 . - alembic upgrade head + 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