mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-02-08 22:05:08 -05:00
<!-- Clearly explain the need for these changes: --> Swap to pooling supabase connections rather than depending on x number of max open connections ### Changes 🏗️ Adds direct connect URL to be used throughout the system <!-- Concisely describe all of the changes made in this pull request: --> ### Checklist 📋 #### For code changes: - [x] I have clearly listed my changes in the PR description - [x] I have made a test plan - [x] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [x] Test thoroughly all of the endpoints in the dev env with switched infra matching pr - [x] Follow the new release plan tests - [x] Follow the old release plan tests #### For configuration changes: - [x] `.env.example` is updated or already compatible with my changes - [x] `docker-compose.yml` is updated or already compatible with my changes - [x] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>configuration changes</summary> - Change how we connect to the database to use direct when configured and database URL when not - update prisma for this - have default matching database and default </details>
52 lines
1.3 KiB
YAML
52 lines
1.3 KiB
YAML
name: AutoGPT Platform - Deploy Dev Environment
|
|
|
|
on:
|
|
push:
|
|
branches: [ dev ]
|
|
paths:
|
|
- 'autogpt_platform/**'
|
|
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
|
|
jobs:
|
|
migrate:
|
|
environment: develop
|
|
name: Run migrations for AutoGPT Platform
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
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 }}
|
|
DIRECT_URL: ${{ secrets.BACKEND_DATABASE_URL }}
|
|
|
|
trigger:
|
|
needs: migrate
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Trigger deploy workflow
|
|
uses: peter-evans/repository-dispatch@v3
|
|
with:
|
|
token: ${{ secrets.DEPLOY_TOKEN }}
|
|
repository: Significant-Gravitas/AutoGPT_cloud_infrastructure
|
|
event-type: build_deploy_dev
|
|
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "repository": "${{ github.repository }}"}'
|