Initial commit: MVP structure + Cursor documentation + Onboarding components
This commit is contained in:
52
deploy-matrix.yml
Normal file
52
deploy-matrix.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
# .github/workflows/deploy-matrix.yml
|
||||
name: Deploy MicroDAO
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
plan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Upload dependency matrix artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: microdao-matrix
|
||||
path: microdao_dependency_matrix.yaml
|
||||
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: plan
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
stage: [P0, P1, P2, P3, P4]
|
||||
env: [dev, stage, prod]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Download matrix
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: microdao-matrix
|
||||
path: .
|
||||
- name: Render deployment plan
|
||||
run: |
|
||||
python - <<'PY'
|
||||
import yaml, sys
|
||||
y = yaml.safe_load(open('microdao_dependency_matrix.yaml'))
|
||||
stage='${{ matrix.stage }}'
|
||||
env='${{ matrix.env }}'
|
||||
svcs=[s for s in y['services'] if s['stage']==stage]
|
||||
print(f"Deploy plan for {stage} in {env}:")
|
||||
for s in svcs:
|
||||
print(f"- {s['id']} deps={s.get('depends_on', [])}")
|
||||
PY
|
||||
- name: Deploy
|
||||
run: |
|
||||
echo "Deploying stage=${{ matrix.stage }} env=${{ matrix.env }}"
|
||||
# Insert helm/terraform commands here, filtered by stage and env
|
||||
- name: Post-deploy health checks
|
||||
run: |
|
||||
echo "Run health gates and canary analysis"
|
||||
Reference in New Issue
Block a user