Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

feat(platform/ci): Run migrations in ci for dev (#8395)

Aarushi2715b81ff55d
diff --git a/.github/workflows/platform-autogpt-deploy.yaml b/.github/workflows/platform-autogpt-deploy.yaml
index 97c2fe7874..549eb04781 100644
--- a/.github/workflows/platform-autogpt-deploy.yaml
+++ b/.github/workflows/platform-autogpt-deploy.yaml
@@ -19,8 +19,42 @@ env:
NAMESPACE: dev-agpt
jobs:
+ migrate:
+ environment: develop
+ name: Run migrations for AutoGPT Platform
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v2
+
+ - name: Set up Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: '3.11'
+
+ - name: Install Python dependencies
+ run: |
+ python -m pip install --upgrade pip
+ pip install prisma
+
+ - name: Run Backend Migrations
+ working-directory: ./autogpt_platform/backend
+ run: |
+ python -m prisma migrate deploy
+ env:
+ DATABASE_URL: ${{ secrets.BACKEND_DATABASE_URL }}
+
+ - name: Run Market Migrations
+ working-directory: ./autogpt_platform/market
+ run: |
+ python -m prisma migrate deploy
+ env:
+ DATABASE_URL: ${{ secrets.MARKET_DATABASE_URL }}
+
build-push-deploy:
name: Build, Push, and Deploy
+ needs: migrate
runs-on: ubuntu-latest
steps: