CD pipeline dinâmico com integração com github e discord através de webhook.
- Definir um workflow no github para testar o código
- Criar um arquivo
.json
emdeployer/settings/
com o seguinte formato:
{
"workflow_id": 71570015,
"name": "Frontend",
"deploy": {
"path": "/root/front-producao/",
"commands": [
{"command": ["git", "pull"], "shell": false},
{"command": ["/usr/bin/docker-compose", "up", "--build", "-d"], "shell": false}
]
}
}
- Vincular o webhook no github.
⚠️ Não se esqueça de definir aSECRET_KEY
no .env