@deftai/directive-content 0.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/deft/SKILL.md +6 -0
- package/.agents/skills/deft-directive-article-review/SKILL.md +11 -0
- package/.agents/skills/deft-directive-build/SKILL.md +10 -0
- package/.agents/skills/deft-directive-cost/SKILL.md +12 -0
- package/.agents/skills/deft-directive-debug/SKILL.md +13 -0
- package/.agents/skills/deft-directive-gh-arch/SKILL.md +11 -0
- package/.agents/skills/deft-directive-gh-slice/SKILL.md +10 -0
- package/.agents/skills/deft-directive-glossary/SKILL.md +10 -0
- package/.agents/skills/deft-directive-interview/SKILL.md +9 -0
- package/.agents/skills/deft-directive-pre-pr/SKILL.md +9 -0
- package/.agents/skills/deft-directive-refinement/SKILL.md +10 -0
- package/.agents/skills/deft-directive-release/SKILL.md +12 -0
- package/.agents/skills/deft-directive-review-cycle/SKILL.md +10 -0
- package/.agents/skills/deft-directive-setup/SKILL.md +10 -0
- package/.agents/skills/deft-directive-swarm/SKILL.md +10 -0
- package/.agents/skills/deft-directive-sync/SKILL.md +9 -0
- package/.agents/skills/deft-directive-triage/SKILL.md +9 -0
- package/.agents/skills/deft-directive-write-skill/SKILL.md +9 -0
- package/LICENSE.md +22 -0
- package/QUICK-START.md +167 -0
- package/UPGRADING.md +517 -0
- package/coding/build-output.md +28 -0
- package/coding/coding.md +235 -0
- package/coding/debugging.md +110 -0
- package/coding/holzmann.md +96 -0
- package/coding/hygiene.md +127 -0
- package/coding/security.md +158 -0
- package/coding/testing.md +162 -0
- package/coding/toolchain.md +44 -0
- package/commands.md +300 -0
- package/context/context.md +57 -0
- package/context/deterministic-split.md +67 -0
- package/context/examples.md +26 -0
- package/context/fractal-summaries.md +69 -0
- package/context/long-horizon.md +46 -0
- package/context/spec-deltas.md +177 -0
- package/context/tool-design.md +34 -0
- package/context/working-memory.md +62 -0
- package/contracts/boundary-maps.md +65 -0
- package/contracts/deterministic-questions.md +59 -0
- package/contracts/hierarchy.md +77 -0
- package/conventions/content-manifest.json +399 -0
- package/conventions/machine-generated-banner.md +130 -0
- package/conventions/references.md +120 -0
- package/conventions/rule-ownership.json +382 -0
- package/conventions/task-caching.md +43 -0
- package/conventions/vbrief-filenames.md +70 -0
- package/deployments/README.md +37 -0
- package/deployments/agentuity/README.md +138 -0
- package/deployments/agentuity/via-cli.md +380 -0
- package/deployments/agentuity/via-cloud.md +425 -0
- package/deployments/agentuity/via-github-actions.md +664 -0
- package/deployments/agentuity/via-gravity-network.md +606 -0
- package/deployments/agentuity/via-vpc.md +607 -0
- package/deployments/aws/README.md +38 -0
- package/deployments/aws/via-app-runner.md +612 -0
- package/deployments/aws/via-ecs-fargate.md +561 -0
- package/deployments/aws/via-elastic-beanstalk.md +628 -0
- package/deployments/aws/via-lambda.md +649 -0
- package/deployments/azure/README.md +37 -0
- package/deployments/azure/via-aks.md +390 -0
- package/deployments/azure/via-app-service.md +564 -0
- package/deployments/azure/via-container-apps.md +599 -0
- package/deployments/azure/via-functions.md +552 -0
- package/deployments/cloud-gov/README.md +63 -0
- package/deployments/cloud-gov/agents/compliance-docs.md +154 -0
- package/deployments/cloud-gov/agents.md +39 -0
- package/deployments/cloud-gov/cicd.md +64 -0
- package/deployments/cloud-gov/deployment.md +150 -0
- package/deployments/cloud-gov/logging.md +43 -0
- package/deployments/cloud-gov/manifest.md +121 -0
- package/deployments/cloud-gov/overview.md +58 -0
- package/deployments/cloud-gov/security.md +46 -0
- package/deployments/cloud-gov/services.md +72 -0
- package/deployments/cloud-gov/upstream/README.md +18 -0
- package/deployments/cloudflare/README.md +33 -0
- package/deployments/cloudflare/via-dashboard.md +83 -0
- package/deployments/cloudflare/via-git.md +90 -0
- package/deployments/cloudflare/via-github-actions.md +185 -0
- package/deployments/cloudflare/via-terraform.md +157 -0
- package/deployments/cloudflare/via-wrangler.md +165 -0
- package/deployments/fly-io/README.md +37 -0
- package/deployments/fly-io/via-dockerfile.md +648 -0
- package/deployments/fly-io/via-flyctl.md +653 -0
- package/deployments/fly-io/via-github-actions.md +695 -0
- package/deployments/fly-io/via-multi-region.md +598 -0
- package/deployments/google/README.md +34 -0
- package/deployments/google/via-app-engine.md +42 -0
- package/deployments/google/via-cloud-functions.md +23 -0
- package/deployments/google/via-cloud-run.md +330 -0
- package/deployments/google/via-gke.md +23 -0
- package/deployments/netlify/README.md +99 -0
- package/deployments/netlify/via-cli.md +17 -0
- package/deployments/netlify/via-functions.md +19 -0
- package/deployments/netlify/via-git.md +25 -0
- package/deployments/vercel/README.md +90 -0
- package/deployments/vercel/via-api.md +16 -0
- package/deployments/vercel/via-cli.md +17 -0
- package/deployments/vercel/via-git.md +24 -0
- package/docs/BROWNFIELD.md +179 -0
- package/docs/getting-started.md +137 -0
- package/docs/good-agents-md.md +137 -0
- package/events/README.md +89 -0
- package/events/event-record.schema.json +26 -0
- package/events/registry.json +166 -0
- package/events/registry.schema.json +71 -0
- package/glossary.md +145 -0
- package/incidents/README.md +81 -0
- package/incidents/_template.md +38 -0
- package/interfaces/cli.md +104 -0
- package/interfaces/rest.md +212 -0
- package/interfaces/tui.md +242 -0
- package/interfaces/web.md +123 -0
- package/languages/6502-DASM.md +132 -0
- package/languages/c.md +235 -0
- package/languages/commands.md +23 -0
- package/languages/cpp.md +132 -0
- package/languages/csharp.md +259 -0
- package/languages/dart.md +183 -0
- package/languages/delphi.md +218 -0
- package/languages/elixir.md +208 -0
- package/languages/go.md +78 -0
- package/languages/java.md +278 -0
- package/languages/javascript.md +163 -0
- package/languages/julia.md +175 -0
- package/languages/kotlin.md +193 -0
- package/languages/markdown.md +168 -0
- package/languages/mermaid.md +146 -0
- package/languages/officejs.md +392 -0
- package/languages/python.md +209 -0
- package/languages/r.md +163 -0
- package/languages/rust.md +216 -0
- package/languages/sql.md +216 -0
- package/languages/swift.md +153 -0
- package/languages/typescript.md +132 -0
- package/languages/vba.md +279 -0
- package/languages/vhdl.md +180 -0
- package/languages/visual-basic.md +151 -0
- package/languages/zig.md +196 -0
- package/meta/SOUL.md +27 -0
- package/meta/code-field.md +44 -0
- package/meta/morals.md +40 -0
- package/meta/philosophy.md +39 -0
- package/meta/project.md +49 -0
- package/meta/ralph.md +223 -0
- package/meta/security.md +80 -0
- package/meta/versioning.md +326 -0
- package/package.json +22 -0
- package/packs/lessons/lessons-pack-0.1.json +553 -0
- package/packs/patterns/patterns-pack-0.1.json +57 -0
- package/packs/rules/rules-pack-0.1.json +4767 -0
- package/packs/skills/skills-pack-0.1.json +262 -0
- package/packs/strategies/strategies-pack-0.1.json +167 -0
- package/packs/swarm-spec/swarm-spec-pack-0.1.json +17 -0
- package/patterns/executor-layer-credentials.md +227 -0
- package/patterns/llm-app.md +156 -0
- package/patterns/multi-agent.md +278 -0
- package/patterns/prompt-assembly-layer-ordering.md +154 -0
- package/patterns/role-as-overlay.md +179 -0
- package/platforms/2600.md +137 -0
- package/platforms/unity.md +329 -0
- package/references/composer-skill-porting.md +152 -0
- package/references/cost-models.md +163 -0
- package/references/ip-risk.md +246 -0
- package/references/plain-english-ux.md +275 -0
- package/resilience/context-pruning.md +67 -0
- package/resilience/continue-here.md +62 -0
- package/scm/changelog.md +276 -0
- package/scm/git.md +139 -0
- package/scm/github.md +265 -0
- package/secrets/.gitkeep +0 -0
- package/skills/deft-build/SKILL.md +20 -0
- package/skills/deft-directive-article-review/SKILL.md +156 -0
- package/skills/deft-directive-build/SKILL.md +302 -0
- package/skills/deft-directive-cost/SKILL.md +201 -0
- package/skills/deft-directive-debug/SKILL.md +140 -0
- package/skills/deft-directive-decompose/SKILL.md +96 -0
- package/skills/deft-directive-gh-arch/SKILL.md +160 -0
- package/skills/deft-directive-gh-slice/SKILL.md +199 -0
- package/skills/deft-directive-glossary/SKILL.md +118 -0
- package/skills/deft-directive-interview/SKILL.md +528 -0
- package/skills/deft-directive-pre-pr/SKILL.md +131 -0
- package/skills/deft-directive-probe/SKILL.md +127 -0
- package/skills/deft-directive-refinement/SKILL.md +403 -0
- package/skills/deft-directive-release/SKILL.md +266 -0
- package/skills/deft-directive-review-cycle/SKILL.md +401 -0
- package/skills/deft-directive-setup/SKILL.md +717 -0
- package/skills/deft-directive-swarm/SKILL.md +989 -0
- package/skills/deft-directive-sync/SKILL.md +288 -0
- package/skills/deft-directive-triage/SKILL.md +137 -0
- package/skills/deft-directive-write-skill/SKILL.md +169 -0
- package/skills/deft-interview/SKILL.md +16 -0
- package/skills/deft-pre-pr/SKILL.md +16 -0
- package/skills/deft-review-cycle/SKILL.md +16 -0
- package/skills/deft-roadmap-refresh/SKILL.md +16 -0
- package/skills/deft-setup/SKILL.md +20 -0
- package/skills/deft-swarm/SKILL.md +16 -0
- package/skills/deft-sync/SKILL.md +16 -0
- package/strategies/README.md +83 -0
- package/strategies/artifact-guards.md +85 -0
- package/strategies/bdd.md +115 -0
- package/strategies/brownfield.md +7 -0
- package/strategies/discuss.md +129 -0
- package/strategies/emit-hints.md +69 -0
- package/strategies/enterprise.md +193 -0
- package/strategies/interview.md +551 -0
- package/strategies/map.md +179 -0
- package/strategies/probe.md +151 -0
- package/strategies/rapid.md +155 -0
- package/strategies/research.md +155 -0
- package/strategies/roadmap.md +9 -0
- package/strategies/speckit.md +437 -0
- package/strategies/v0-20-contract.md +134 -0
- package/strategies/yolo.md +169 -0
- package/swarm/swarm.md +300 -0
- package/templates/COST-ESTIMATE.md +114 -0
- package/templates/PULL_REQUEST_TEMPLATE.md +35 -0
- package/templates/agent-prompt-preamble.md +409 -0
- package/templates/agents-entry.md +211 -0
- package/templates/agents-entry.placeholders.md +75 -0
- package/templates/embed.go +20 -0
- package/templates/embed_test.go +36 -0
- package/templates/make-spec-example.md +9 -0
- package/templates/make-spec.md +246 -0
- package/templates/project.md.template +52 -0
- package/templates/specification.md +1 -0
- package/templates/swarm-greptile-poller-prompt.md +556 -0
- package/templates/user.md.template +31 -0
- package/tools/RWLDL.md +80 -0
- package/tools/greptile.md +141 -0
- package/tools/installer.md +23 -0
- package/tools/taskfile-migration.md +32 -0
- package/tools/taskfile.md +185 -0
- package/tools/telemetry.md +285 -0
- package/vbrief/schemas/cache-meta.schema.json +137 -0
- package/vbrief/schemas/candidates.schema.json +130 -0
- package/vbrief/schemas/codebase-map.schema.json +213 -0
- package/vbrief/schemas/lessons-pack.schema.json +134 -0
- package/vbrief/schemas/patterns-pack.schema.json +84 -0
- package/vbrief/schemas/rules-pack.schema.json +105 -0
- package/vbrief/schemas/skills-pack.schema.json +94 -0
- package/vbrief/schemas/slices.schema.json +87 -0
- package/vbrief/schemas/strategies-pack.schema.json +89 -0
- package/vbrief/schemas/swarm-spec-pack.schema.json +84 -0
- package/vbrief/schemas/vbrief-core.schema.json +1022 -0
- package/vbrief/vbrief.md +684 -0
- package/verification/integration.md +76 -0
- package/verification/plan-checking.md +85 -0
- package/verification/uat.md +60 -0
- package/verification/verification.md +117 -0
|
@@ -0,0 +1,664 @@
|
|
|
1
|
+
# Deploy via GitHub Actions
|
|
2
|
+
|
|
3
|
+
Automate agent deployments using GitHub Actions for continuous integration and delivery. Push code to trigger automatic deployments with built-in testing, validation, and rollback capabilities.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
Agentuity integrates seamlessly with GitHub Actions to provide:
|
|
8
|
+
- **Automatic Deployments**: Deploy on push to main
|
|
9
|
+
- **Preview Deployments**: Unique URLs for every pull request
|
|
10
|
+
- **Environment Isolation**: Separate staging and production
|
|
11
|
+
- **Rollback Protection**: Automatic rollback on errors
|
|
12
|
+
- **Secrets Management**: Secure credential handling
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
- GitHub repository with your agent code
|
|
17
|
+
- Agentuity account
|
|
18
|
+
- Agentuity API key or GitHub App integration
|
|
19
|
+
|
|
20
|
+
## Quick Setup
|
|
21
|
+
|
|
22
|
+
### 1. Get Agentuity API Key
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Generate deployment API key
|
|
26
|
+
agentuity apikey create --name github-actions --scope deploy
|
|
27
|
+
|
|
28
|
+
# Copy the key for GitHub secrets
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### 2. Add GitHub Secrets
|
|
32
|
+
|
|
33
|
+
Go to your repository ā Settings ā Secrets and variables ā Actions
|
|
34
|
+
|
|
35
|
+
Add these secrets:
|
|
36
|
+
- `AGENTUITY_API_KEY` - Your Agentuity API key
|
|
37
|
+
- `AGENTUITY_PROJECT_ID` - Your project ID (optional)
|
|
38
|
+
|
|
39
|
+
### 3. Create Workflow File
|
|
40
|
+
|
|
41
|
+
Create `.github/workflows/deploy.yml`:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
name: Deploy to Agentuity
|
|
45
|
+
|
|
46
|
+
on:
|
|
47
|
+
push:
|
|
48
|
+
branches:
|
|
49
|
+
- main
|
|
50
|
+
pull_request:
|
|
51
|
+
types: [opened, synchronize]
|
|
52
|
+
|
|
53
|
+
jobs:
|
|
54
|
+
deploy:
|
|
55
|
+
runs-on: ubuntu-latest
|
|
56
|
+
|
|
57
|
+
steps:
|
|
58
|
+
- name: Checkout code
|
|
59
|
+
uses: actions/checkout@v4
|
|
60
|
+
|
|
61
|
+
- name: Setup Node.js
|
|
62
|
+
uses: actions/setup-node@v4
|
|
63
|
+
with:
|
|
64
|
+
node-version: '18'
|
|
65
|
+
cache: 'npm'
|
|
66
|
+
|
|
67
|
+
- name: Install dependencies
|
|
68
|
+
run: npm ci
|
|
69
|
+
|
|
70
|
+
- name: Run tests
|
|
71
|
+
run: npm test
|
|
72
|
+
|
|
73
|
+
- name: Install Agentuity CLI
|
|
74
|
+
run: |
|
|
75
|
+
curl -fsS https://agentuity.sh | sh
|
|
76
|
+
echo "$HOME/.agentuity/bin" >> $GITHUB_PATH
|
|
77
|
+
|
|
78
|
+
- name: Deploy to Agentuity
|
|
79
|
+
env:
|
|
80
|
+
AGENTUITY_API_KEY: ${{ secrets.AGENTUITY_API_KEY }}
|
|
81
|
+
run: |
|
|
82
|
+
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
|
83
|
+
agentuity deploy --preview
|
|
84
|
+
else
|
|
85
|
+
agentuity deploy --production
|
|
86
|
+
fi
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## Workflow Examples
|
|
90
|
+
|
|
91
|
+
### Production Deployment
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
name: Production Deploy
|
|
95
|
+
|
|
96
|
+
on:
|
|
97
|
+
push:
|
|
98
|
+
branches:
|
|
99
|
+
- main
|
|
100
|
+
|
|
101
|
+
jobs:
|
|
102
|
+
deploy:
|
|
103
|
+
runs-on: ubuntu-latest
|
|
104
|
+
environment: production
|
|
105
|
+
|
|
106
|
+
steps:
|
|
107
|
+
- uses: actions/checkout@v4
|
|
108
|
+
|
|
109
|
+
- name: Setup Node.js
|
|
110
|
+
uses: actions/setup-node@v4
|
|
111
|
+
with:
|
|
112
|
+
node-version: '18'
|
|
113
|
+
|
|
114
|
+
- name: Install dependencies
|
|
115
|
+
run: npm ci
|
|
116
|
+
|
|
117
|
+
- name: Build
|
|
118
|
+
run: npm run build
|
|
119
|
+
|
|
120
|
+
- name: Run tests
|
|
121
|
+
run: npm test
|
|
122
|
+
|
|
123
|
+
- name: Deploy to Agentuity
|
|
124
|
+
uses: agentuity/deploy-action@v1
|
|
125
|
+
with:
|
|
126
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
127
|
+
environment: production
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Multi-Environment with Manual Approval
|
|
131
|
+
|
|
132
|
+
```yaml
|
|
133
|
+
name: Deploy Pipeline
|
|
134
|
+
|
|
135
|
+
on:
|
|
136
|
+
push:
|
|
137
|
+
branches:
|
|
138
|
+
- main
|
|
139
|
+
|
|
140
|
+
jobs:
|
|
141
|
+
test:
|
|
142
|
+
runs-on: ubuntu-latest
|
|
143
|
+
steps:
|
|
144
|
+
- uses: actions/checkout@v4
|
|
145
|
+
- uses: actions/setup-node@v4
|
|
146
|
+
with:
|
|
147
|
+
node-version: '18'
|
|
148
|
+
- run: npm ci
|
|
149
|
+
- run: npm test
|
|
150
|
+
- run: npm run lint
|
|
151
|
+
|
|
152
|
+
deploy-staging:
|
|
153
|
+
needs: test
|
|
154
|
+
runs-on: ubuntu-latest
|
|
155
|
+
environment: staging
|
|
156
|
+
steps:
|
|
157
|
+
- uses: actions/checkout@v4
|
|
158
|
+
- uses: agentuity/deploy-action@v1
|
|
159
|
+
with:
|
|
160
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
161
|
+
environment: staging
|
|
162
|
+
|
|
163
|
+
deploy-production:
|
|
164
|
+
needs: deploy-staging
|
|
165
|
+
runs-on: ubuntu-latest
|
|
166
|
+
environment: production
|
|
167
|
+
steps:
|
|
168
|
+
- uses: actions/checkout@v4
|
|
169
|
+
- uses: agentuity/deploy-action@v1
|
|
170
|
+
with:
|
|
171
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
172
|
+
environment: production
|
|
173
|
+
wait-for-completion: true
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Preview Deployments for PRs
|
|
177
|
+
|
|
178
|
+
```yaml
|
|
179
|
+
name: PR Preview
|
|
180
|
+
|
|
181
|
+
on:
|
|
182
|
+
pull_request:
|
|
183
|
+
types: [opened, synchronize, reopened]
|
|
184
|
+
|
|
185
|
+
jobs:
|
|
186
|
+
preview:
|
|
187
|
+
runs-on: ubuntu-latest
|
|
188
|
+
steps:
|
|
189
|
+
- uses: actions/checkout@v4
|
|
190
|
+
|
|
191
|
+
- name: Deploy Preview
|
|
192
|
+
uses: agentuity/deploy-action@v1
|
|
193
|
+
id: deploy
|
|
194
|
+
with:
|
|
195
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
196
|
+
preview: true
|
|
197
|
+
|
|
198
|
+
- name: Comment PR
|
|
199
|
+
uses: actions/github-script@v7
|
|
200
|
+
with:
|
|
201
|
+
script: |
|
|
202
|
+
github.rest.issues.createComment({
|
|
203
|
+
issue_number: context.issue.number,
|
|
204
|
+
owner: context.repo.owner,
|
|
205
|
+
repo: context.repo.repo,
|
|
206
|
+
body: `š Preview deployed to: ${{ steps.deploy.outputs.url }}`
|
|
207
|
+
})
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Canary Deployment
|
|
211
|
+
|
|
212
|
+
```yaml
|
|
213
|
+
name: Canary Deploy
|
|
214
|
+
|
|
215
|
+
on:
|
|
216
|
+
workflow_dispatch:
|
|
217
|
+
inputs:
|
|
218
|
+
traffic_percentage:
|
|
219
|
+
description: 'Percentage of traffic for canary'
|
|
220
|
+
required: true
|
|
221
|
+
default: '10'
|
|
222
|
+
|
|
223
|
+
jobs:
|
|
224
|
+
canary:
|
|
225
|
+
runs-on: ubuntu-latest
|
|
226
|
+
steps:
|
|
227
|
+
- uses: actions/checkout@v4
|
|
228
|
+
|
|
229
|
+
- name: Deploy Canary
|
|
230
|
+
uses: agentuity/deploy-action@v1
|
|
231
|
+
with:
|
|
232
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
233
|
+
canary: true
|
|
234
|
+
traffic-percentage: ${{ inputs.traffic_percentage }}
|
|
235
|
+
|
|
236
|
+
- name: Monitor Canary
|
|
237
|
+
run: |
|
|
238
|
+
# Wait and check error rates
|
|
239
|
+
sleep 300
|
|
240
|
+
agentuity metrics error-rate --last 5m
|
|
241
|
+
|
|
242
|
+
- name: Promote or Rollback
|
|
243
|
+
run: |
|
|
244
|
+
ERROR_RATE=$(agentuity metrics error-rate --last 5m --json | jq -r '.rate')
|
|
245
|
+
if (( $(echo "$ERROR_RATE < 0.01" | bc -l) )); then
|
|
246
|
+
agentuity canary promote
|
|
247
|
+
else
|
|
248
|
+
agentuity canary rollback
|
|
249
|
+
fi
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Agentuity Deploy Action
|
|
253
|
+
|
|
254
|
+
### Basic Usage
|
|
255
|
+
|
|
256
|
+
```yaml
|
|
257
|
+
- uses: agentuity/deploy-action@v1
|
|
258
|
+
with:
|
|
259
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### All Options
|
|
263
|
+
|
|
264
|
+
```yaml
|
|
265
|
+
- uses: agentuity/deploy-action@v1
|
|
266
|
+
id: deploy
|
|
267
|
+
with:
|
|
268
|
+
# Required
|
|
269
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
270
|
+
|
|
271
|
+
# Optional
|
|
272
|
+
project-id: my-agent
|
|
273
|
+
environment: production # or staging, preview
|
|
274
|
+
preview: false # Set true for PR previews
|
|
275
|
+
wait-for-completion: true
|
|
276
|
+
timeout: 600 # seconds
|
|
277
|
+
|
|
278
|
+
# Canary options
|
|
279
|
+
canary: false
|
|
280
|
+
traffic-percentage: 10
|
|
281
|
+
|
|
282
|
+
# Build options
|
|
283
|
+
working-directory: ./
|
|
284
|
+
build-command: npm run build
|
|
285
|
+
|
|
286
|
+
# Validation
|
|
287
|
+
run-tests: true
|
|
288
|
+
test-command: npm test
|
|
289
|
+
|
|
290
|
+
# Deployment options
|
|
291
|
+
regions: us-east-1,eu-west-1
|
|
292
|
+
min-instances: 0
|
|
293
|
+
max-instances: 10
|
|
294
|
+
|
|
295
|
+
outputs:
|
|
296
|
+
url: ${{ steps.deploy.outputs.url }}
|
|
297
|
+
deployment-id: ${{ steps.deploy.outputs.deployment-id }}
|
|
298
|
+
version: ${{ steps.deploy.outputs.version }}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
## Advanced Workflows
|
|
302
|
+
|
|
303
|
+
### Matrix Deployment (Multiple Agents)
|
|
304
|
+
|
|
305
|
+
```yaml
|
|
306
|
+
name: Deploy All Agents
|
|
307
|
+
|
|
308
|
+
on:
|
|
309
|
+
push:
|
|
310
|
+
branches: [main]
|
|
311
|
+
|
|
312
|
+
jobs:
|
|
313
|
+
deploy:
|
|
314
|
+
runs-on: ubuntu-latest
|
|
315
|
+
strategy:
|
|
316
|
+
matrix:
|
|
317
|
+
agent: [chat, search, analytics]
|
|
318
|
+
steps:
|
|
319
|
+
- uses: actions/checkout@v4
|
|
320
|
+
|
|
321
|
+
- uses: agentuity/deploy-action@v1
|
|
322
|
+
with:
|
|
323
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
324
|
+
project-id: ${{ matrix.agent }}
|
|
325
|
+
working-directory: ./agents/${{ matrix.agent }}
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
### Scheduled Deployments
|
|
329
|
+
|
|
330
|
+
```yaml
|
|
331
|
+
name: Nightly Deploy
|
|
332
|
+
|
|
333
|
+
on:
|
|
334
|
+
schedule:
|
|
335
|
+
- cron: '0 2 * * *' # 2 AM daily
|
|
336
|
+
workflow_dispatch:
|
|
337
|
+
|
|
338
|
+
jobs:
|
|
339
|
+
deploy:
|
|
340
|
+
runs-on: ubuntu-latest
|
|
341
|
+
steps:
|
|
342
|
+
- uses: actions/checkout@v4
|
|
343
|
+
|
|
344
|
+
- uses: agentuity/deploy-action@v1
|
|
345
|
+
with:
|
|
346
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
347
|
+
environment: staging
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Deployment with Notifications
|
|
351
|
+
|
|
352
|
+
```yaml
|
|
353
|
+
name: Deploy with Notifications
|
|
354
|
+
|
|
355
|
+
on:
|
|
356
|
+
push:
|
|
357
|
+
branches: [main]
|
|
358
|
+
|
|
359
|
+
jobs:
|
|
360
|
+
deploy:
|
|
361
|
+
runs-on: ubuntu-latest
|
|
362
|
+
steps:
|
|
363
|
+
- uses: actions/checkout@v4
|
|
364
|
+
|
|
365
|
+
- name: Deploy
|
|
366
|
+
id: deploy
|
|
367
|
+
uses: agentuity/deploy-action@v1
|
|
368
|
+
with:
|
|
369
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
370
|
+
|
|
371
|
+
- name: Slack Notification
|
|
372
|
+
if: success()
|
|
373
|
+
uses: slackapi/slack-github-action@v1
|
|
374
|
+
with:
|
|
375
|
+
payload: |
|
|
376
|
+
{
|
|
377
|
+
"text": "ā
Agent deployed: ${{ steps.deploy.outputs.url }}"
|
|
378
|
+
}
|
|
379
|
+
env:
|
|
380
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
|
|
381
|
+
|
|
382
|
+
- name: Slack Failure
|
|
383
|
+
if: failure()
|
|
384
|
+
uses: slackapi/slack-github-action@v1
|
|
385
|
+
with:
|
|
386
|
+
payload: |
|
|
387
|
+
{
|
|
388
|
+
"text": "ā Deployment failed: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
389
|
+
}
|
|
390
|
+
env:
|
|
391
|
+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
## Security Best Practices
|
|
395
|
+
|
|
396
|
+
### Using OIDC Instead of API Keys
|
|
397
|
+
|
|
398
|
+
```yaml
|
|
399
|
+
name: Deploy with OIDC
|
|
400
|
+
|
|
401
|
+
permissions:
|
|
402
|
+
id-token: write
|
|
403
|
+
contents: read
|
|
404
|
+
|
|
405
|
+
jobs:
|
|
406
|
+
deploy:
|
|
407
|
+
runs-on: ubuntu-latest
|
|
408
|
+
steps:
|
|
409
|
+
- uses: actions/checkout@v4
|
|
410
|
+
|
|
411
|
+
- name: Configure Agentuity credentials
|
|
412
|
+
uses: agentuity/configure-credentials@v1
|
|
413
|
+
with:
|
|
414
|
+
role-to-assume: arn:agentuity:iam::deploy-role
|
|
415
|
+
role-session-name: github-actions-deploy
|
|
416
|
+
|
|
417
|
+
- name: Deploy
|
|
418
|
+
run: agentuity deploy
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
### Secrets Scanning
|
|
422
|
+
|
|
423
|
+
```yaml
|
|
424
|
+
name: Security Scan
|
|
425
|
+
|
|
426
|
+
on: [push, pull_request]
|
|
427
|
+
|
|
428
|
+
jobs:
|
|
429
|
+
scan:
|
|
430
|
+
runs-on: ubuntu-latest
|
|
431
|
+
steps:
|
|
432
|
+
- uses: actions/checkout@v4
|
|
433
|
+
|
|
434
|
+
- name: Run Trivy security scanner
|
|
435
|
+
uses: aquasecurity/trivy-action@master
|
|
436
|
+
with:
|
|
437
|
+
scan-type: 'fs'
|
|
438
|
+
scan-ref: '.'
|
|
439
|
+
|
|
440
|
+
- name: Check for secrets
|
|
441
|
+
uses: trufflesecurity/trufflehog@main
|
|
442
|
+
with:
|
|
443
|
+
path: ./
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
## Environment Configuration
|
|
447
|
+
|
|
448
|
+
### GitHub Environments
|
|
449
|
+
|
|
450
|
+
Configure in repository settings for manual approvals:
|
|
451
|
+
|
|
452
|
+
1. Go to Settings ā Environments
|
|
453
|
+
2. Create `production` environment
|
|
454
|
+
3. Enable "Required reviewers"
|
|
455
|
+
4. Add reviewer list
|
|
456
|
+
|
|
457
|
+
```yaml
|
|
458
|
+
jobs:
|
|
459
|
+
deploy:
|
|
460
|
+
environment: production # Requires approval
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
### Environment Variables
|
|
464
|
+
|
|
465
|
+
```yaml
|
|
466
|
+
env:
|
|
467
|
+
AGENTUITY_PROJECT: my-agent
|
|
468
|
+
NODE_ENV: production
|
|
469
|
+
|
|
470
|
+
jobs:
|
|
471
|
+
deploy:
|
|
472
|
+
steps:
|
|
473
|
+
- name: Deploy
|
|
474
|
+
env:
|
|
475
|
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
|
476
|
+
run: agentuity deploy
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
## Monitoring & Rollback
|
|
480
|
+
|
|
481
|
+
### Post-Deployment Verification
|
|
482
|
+
|
|
483
|
+
```yaml
|
|
484
|
+
- name: Verify Deployment
|
|
485
|
+
run: |
|
|
486
|
+
# Wait for deployment to stabilize
|
|
487
|
+
sleep 30
|
|
488
|
+
|
|
489
|
+
# Health check
|
|
490
|
+
curl -f ${{ steps.deploy.outputs.url }}/health || exit 1
|
|
491
|
+
|
|
492
|
+
# Check metrics
|
|
493
|
+
ERROR_RATE=$(agentuity metrics error-rate --last 5m --json | jq -r '.rate')
|
|
494
|
+
if (( $(echo "$ERROR_RATE > 0.05" | bc -l) )); then
|
|
495
|
+
echo "High error rate detected"
|
|
496
|
+
exit 1
|
|
497
|
+
fi
|
|
498
|
+
|
|
499
|
+
- name: Rollback on Failure
|
|
500
|
+
if: failure()
|
|
501
|
+
run: agentuity rollback
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Automated Rollback
|
|
505
|
+
|
|
506
|
+
```yaml
|
|
507
|
+
name: Auto Rollback
|
|
508
|
+
|
|
509
|
+
on:
|
|
510
|
+
workflow_dispatch:
|
|
511
|
+
inputs:
|
|
512
|
+
deployment-id:
|
|
513
|
+
required: true
|
|
514
|
+
|
|
515
|
+
jobs:
|
|
516
|
+
rollback:
|
|
517
|
+
runs-on: ubuntu-latest
|
|
518
|
+
steps:
|
|
519
|
+
- name: Rollback Deployment
|
|
520
|
+
uses: agentuity/rollback-action@v1
|
|
521
|
+
with:
|
|
522
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
523
|
+
deployment-id: ${{ inputs.deployment-id }}
|
|
524
|
+
```
|
|
525
|
+
|
|
526
|
+
## Troubleshooting
|
|
527
|
+
|
|
528
|
+
### Deployment Fails
|
|
529
|
+
|
|
530
|
+
```yaml
|
|
531
|
+
- name: Debug on Failure
|
|
532
|
+
if: failure()
|
|
533
|
+
run: |
|
|
534
|
+
echo "::group::Agentuity Logs"
|
|
535
|
+
agentuity logs --tail 100
|
|
536
|
+
echo "::endgroup::"
|
|
537
|
+
|
|
538
|
+
echo "::group::Deployment Status"
|
|
539
|
+
agentuity deploy status
|
|
540
|
+
echo "::endgroup::"
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Timeout Issues
|
|
544
|
+
|
|
545
|
+
```yaml
|
|
546
|
+
- name: Deploy with Extended Timeout
|
|
547
|
+
uses: agentuity/deploy-action@v1
|
|
548
|
+
with:
|
|
549
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
550
|
+
timeout: 1200 # 20 minutes
|
|
551
|
+
wait-for-completion: true
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
## Best Practices
|
|
555
|
+
|
|
556
|
+
1. **Use Environments**: Separate staging and production
|
|
557
|
+
2. **Enable Branch Protection**: Require PR reviews before deploying
|
|
558
|
+
3. **Test Before Deploy**: Always run tests in CI
|
|
559
|
+
4. **Use OIDC**: More secure than long-lived API keys
|
|
560
|
+
5. **Monitor Deployments**: Add health checks and metrics
|
|
561
|
+
6. **Automate Rollbacks**: Implement automatic rollback on errors
|
|
562
|
+
7. **Document Workflows**: Add comments and README
|
|
563
|
+
|
|
564
|
+
## Complete Example
|
|
565
|
+
|
|
566
|
+
```yaml
|
|
567
|
+
name: Complete CI/CD Pipeline
|
|
568
|
+
|
|
569
|
+
on:
|
|
570
|
+
push:
|
|
571
|
+
branches: [main]
|
|
572
|
+
pull_request:
|
|
573
|
+
types: [opened, synchronize]
|
|
574
|
+
|
|
575
|
+
env:
|
|
576
|
+
NODE_VERSION: '18'
|
|
577
|
+
|
|
578
|
+
jobs:
|
|
579
|
+
test:
|
|
580
|
+
runs-on: ubuntu-latest
|
|
581
|
+
steps:
|
|
582
|
+
- uses: actions/checkout@v4
|
|
583
|
+
|
|
584
|
+
- uses: actions/setup-node@v4
|
|
585
|
+
with:
|
|
586
|
+
node-version: ${{ env.NODE_VERSION }}
|
|
587
|
+
cache: 'npm'
|
|
588
|
+
|
|
589
|
+
- run: npm ci
|
|
590
|
+
- run: npm run lint
|
|
591
|
+
- run: npm test
|
|
592
|
+
- run: npm run build
|
|
593
|
+
|
|
594
|
+
- name: Upload build artifacts
|
|
595
|
+
uses: actions/upload-artifact@v3
|
|
596
|
+
with:
|
|
597
|
+
name: dist
|
|
598
|
+
path: dist/
|
|
599
|
+
|
|
600
|
+
deploy-preview:
|
|
601
|
+
if: github.event_name == 'pull_request'
|
|
602
|
+
needs: test
|
|
603
|
+
runs-on: ubuntu-latest
|
|
604
|
+
steps:
|
|
605
|
+
- uses: actions/checkout@v4
|
|
606
|
+
|
|
607
|
+
- uses: actions/download-artifact@v3
|
|
608
|
+
with:
|
|
609
|
+
name: dist
|
|
610
|
+
path: dist/
|
|
611
|
+
|
|
612
|
+
- uses: agentuity/deploy-action@v1
|
|
613
|
+
id: deploy
|
|
614
|
+
with:
|
|
615
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
616
|
+
preview: true
|
|
617
|
+
|
|
618
|
+
- uses: actions/github-script@v7
|
|
619
|
+
with:
|
|
620
|
+
script: |
|
|
621
|
+
github.rest.issues.createComment({
|
|
622
|
+
issue_number: context.issue.number,
|
|
623
|
+
owner: context.repo.owner,
|
|
624
|
+
repo: context.repo.repo,
|
|
625
|
+
body: `š Preview: ${{ steps.deploy.outputs.url }}\nš [Logs](https://console.agentuity.com/deployments/${{ steps.deploy.outputs.deployment-id }})`
|
|
626
|
+
})
|
|
627
|
+
|
|
628
|
+
deploy-production:
|
|
629
|
+
if: github.ref == 'refs/heads/main'
|
|
630
|
+
needs: test
|
|
631
|
+
runs-on: ubuntu-latest
|
|
632
|
+
environment: production
|
|
633
|
+
steps:
|
|
634
|
+
- uses: actions/checkout@v4
|
|
635
|
+
|
|
636
|
+
- uses: actions/download-artifact@v3
|
|
637
|
+
with:
|
|
638
|
+
name: dist
|
|
639
|
+
path: dist/
|
|
640
|
+
|
|
641
|
+
- uses: agentuity/deploy-action@v1
|
|
642
|
+
id: deploy
|
|
643
|
+
with:
|
|
644
|
+
api-key: ${{ secrets.AGENTUITY_API_KEY }}
|
|
645
|
+
environment: production
|
|
646
|
+
wait-for-completion: true
|
|
647
|
+
|
|
648
|
+
- name: Verify Deployment
|
|
649
|
+
run: |
|
|
650
|
+
curl -f ${{ steps.deploy.outputs.url }}/health
|
|
651
|
+
agentuity metrics error-rate --deployment ${{ steps.deploy.outputs.deployment-id }}
|
|
652
|
+
|
|
653
|
+
- name: Notify Team
|
|
654
|
+
if: success()
|
|
655
|
+
run: |
|
|
656
|
+
echo "ā
Deployed to production: ${{ steps.deploy.outputs.url }}"
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
## References
|
|
660
|
+
|
|
661
|
+
- [GitHub Actions Documentation](https://docs.github.com/actions)
|
|
662
|
+
- [Agentuity Deploy Action](https://github.com/agentuity/deploy-action)
|
|
663
|
+
- [OIDC with Agentuity](https://agentuity.dev/deployment/oidc)
|
|
664
|
+
- [Deployment Best Practices](https://agentuity.dev/deployment/best-practices)
|