ci(convex): relaxar condicao de execucao\n\n- Roda em workflow_dispatch (sem input), em push na main se secrets presentes, ou quando convex/** mudar.\n- Evita 'job skipped' quando for necessario publicar as functions.

This commit is contained in:
Esdras Renan 2025-10-09 18:42:55 -03:00
parent 8e1575e2a5
commit 0459637429

View file

@ -187,7 +187,11 @@ jobs:
convex_deploy: convex_deploy:
name: Deploy Convex functions name: Deploy Convex functions
needs: changes needs: changes
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.force_convex_deploy == 'true') || needs.changes.outputs.convex == 'true' }} # Executa quando:
# - Disparo manual (workflow_dispatch) — sem exigir input
# - Push na main com secrets presentes (deploy automático)
# - Ou quando houver mudanças em convex/** detectadas pelo filtro
if: ${{ github.event_name == 'workflow_dispatch' || (github.ref == 'refs/heads/main' && secrets.CONVEX_SELF_HOSTED_URL != '' && secrets.CONVEX_SELF_HOSTED_ADMIN_KEY != '') || needs.changes.outputs.convex == 'true' }}
runs-on: [ self-hosted, linux, vps ] runs-on: [ self-hosted, linux, vps ]
env: env:
APP_DIR: /srv/apps/sistema APP_DIR: /srv/apps/sistema