diff --git a/.github/workflows/ci-cd-web-desktop.yml b/.github/workflows/ci-cd-web-desktop.yml index f411d2c..2e05b52 100644 --- a/.github/workflows/ci-cd-web-desktop.yml +++ b/.github/workflows/ci-cd-web-desktop.yml @@ -187,7 +187,11 @@ jobs: convex_deploy: name: Deploy Convex functions 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 ] env: APP_DIR: /srv/apps/sistema