Skip to content

Commit 9bd8ad5

Browse files
Add docs for AOP Deploy API (#4076)
Co-authored-by: Greyson LaLonde <[email protected]>
1 parent 0632a05 commit 9bd8ad5

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

docs/en/enterprise/guides/deploy-crew.mdx

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,97 @@ You can also deploy your crews directly through the CrewAI AOP web interface by
187187

188188
</Steps>
189189

190+
## Option 3: Redeploy Using API (CI/CD Integration)
191+
192+
For automated deployments in CI/CD pipelines, you can use the CrewAI API to trigger redeployments of existing crews. This is particularly useful for GitHub Actions, Jenkins, or other automation workflows.
193+
194+
<Steps>
195+
<Step title="Get Your Personal Access Token">
196+
197+
Navigate to your CrewAI AOP account settings to generate an API token:
198+
199+
1. Go to [app.crewai.com](https://app.crewai.com)
200+
2. Click on **Settings****Account****Personal Access Token**
201+
3. Generate a new token and copy it securely
202+
4. Store this token as a secret in your CI/CD system
203+
204+
</Step>
205+
206+
<Step title="Find Your Automation UUID">
207+
208+
Locate the unique identifier for your deployed crew:
209+
210+
1. Go to **Automations** in your CrewAI AOP dashboard
211+
2. Select your existing automation/crew
212+
3. Click on **Additional Details**
213+
4. Copy the **UUID** - this identifies your specific crew deployment
214+
215+
</Step>
216+
217+
<Step title="Trigger Redeployment via API">
218+
219+
Use the Deploy API endpoint to trigger a redeployment:
220+
221+
```bash
222+
curl -i -X POST \
223+
-H "Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN" \
224+
https://app.crewai.com/crewai_plus/api/v1/crews/YOUR-AUTOMATION-UUID/deploy
225+
226+
# HTTP/2 200
227+
# content-type: application/json
228+
#
229+
# {
230+
# "uuid": "your-automation-uuid",
231+
# "status": "Deploy Enqueued",
232+
# "public_url": "https://your-crew-deployment.crewai.com",
233+
# "token": "your-bearer-token"
234+
# }
235+
```
236+
237+
<Info>
238+
If your automation was first created connected to Git, the API will automatically pull the latest changes from your repository before redeploying.
239+
</Info>
240+
241+
242+
</Step>
243+
244+
<Step title="GitHub Actions Integration Example">
245+
246+
Here's a GitHub Actions workflow with more complex deployment triggers:
247+
248+
```yaml
249+
name: Deploy CrewAI Automation
250+
251+
on:
252+
push:
253+
branches: [ main ]
254+
pull_request:
255+
types: [ labeled ]
256+
release:
257+
types: [ published ]
258+
259+
jobs:
260+
deploy:
261+
runs-on: ubuntu-latest
262+
if: |
263+
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
264+
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'deploy')) ||
265+
(github.event_name == 'release')
266+
steps:
267+
- name: Trigger CrewAI Redeployment
268+
run: |
269+
curl -X POST \
270+
-H "Authorization: Bearer ${{ secrets.CREWAI_PAT }}" \
271+
https://app.crewai.com/crewai_plus/api/v1/crews/${{ secrets.CREWAI_AUTOMATION_UUID }}/deploy
272+
```
273+
274+
<Tip>
275+
Add `CREWAI_PAT` and `CREWAI_AUTOMATION_UUID` as repository secrets. For PR deployments, add a "deploy" label to trigger the workflow.
276+
</Tip>
277+
278+
</Step>
279+
</Steps>
280+
190281
## ⚠️ Environment Variable Security Requirements
191282

192283
<Warning>

0 commit comments

Comments
 (0)