Files
Pygentic-AI/.github/workflows/komodo-deploy.yml
Francis Secada 9e2f79d455 docs: rename project to StrategIQ
Rename GitHub repo from Pygentic-AI to strategiq. Update all
user-facing references: README badges/links/prose, page <title>,
hero alt text, CLAUDE.md, system-prompt, justfile comments,
komodo deploy echo, SCSS header comments, and compiled CSS.

Intentionally left unchanged: Docker registry image name
(s3docker.francissecada.com/pygentic_ai), container paths
(/opt/pygentic_ai), DB schema, CSS filenames, Traefik labels,
and the production domain (pygenticai.francissecada.com) — all
operational names that would require infra changes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 20:52:45 -05:00

43 lines
1.6 KiB
YAML

name: Komodo Deployment Trigger
on:
workflow_run:
workflows: ["Docker Image CI"]
types:
- completed
branches: [ "**_deploy", "main" ]
jobs:
trigger_komodo_deployment:
runs-on: ubuntu-latest
# Only run if the 'Docker Image CI' workflow was successful
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: Extract branch name from triggering workflow
id: branch
run: echo "BRANCH_NAME=$(echo ${{ github.event.workflow_run.head_branch }} | sed 's/\//-/g')" >> $GITHUB_OUTPUT
- name: Trigger Komodo Stack Deployment
env:
# The webhook URL is constructed from secrets
KOMODO_WEBHOOK_URL: "https://${{ secrets.KOMODO_HOST }}/listener/github/stack/${{ secrets.KOMODO_STACK_ID_OR_NAME }}/deploy"
run: |
# Get the branch name from the previous step's output
branch_name="${{ steps.branch.outputs.BRANCH_NAME }}"
# Construct a JSON payload containing the branch name
# This tells Komodo which specific branch/tag to deploy
payload=$(printf '{"ref":"%s"}' "$branch_name")
# Generate the signature based on the payload
signature=$(echo -n "$payload" | openssl dgst -sha256 -hmac "${{ secrets.KOMODO_WEBHOOK_SECRET }}" | sed 's/^.* //')
# Send the request to the Komodo webhook with the payload
echo "Triggering StrategIQ deployment for branch: $branch_name"
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Hub-Signature-256: sha256=$signature" \
-d "$payload" \
--fail-with-body \
"${KOMODO_WEBHOOK_URL}"