restore dev deploy (#10122)
<!-- Clearly explain the need for these changes: --> ### Changes 🏗️ <!-- Concisely describe all of the changes made in this pull request: --> ### Checklist 📋 #### For code changes: - [ ] I have clearly listed my changes in the PR description - [ ] I have made a test plan - [ ] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [ ] ... <details> <summary>Example test plan</summary> - [ ] Create from scratch and execute an agent with at least 3 blocks - [ ] Import an agent from file upload, and confirm it executes correctly - [ ] Upload agent to marketplace - [ ] Import an agent from marketplace and confirm it executes correctly - [ ] Edit an agent from monitor, and confirm it executes correctly </details> #### For configuration changes: - [ ] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details>pull/10147/head^2
parent
5d0faab4b1
commit
3a20c5a4bb
|
@ -0,0 +1,51 @@
|
||||||
|
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 }}"}'
|
Loading…
Reference in New Issue