ci: permitir workflow_dispatch com force deploy (web/convex)\n\n- Adiciona gatilho manual e inputs para forçar deploy sem depender do paths-filter.\n- Mantém filtros por push como antes.\n- Útil para reexecutar deploy após ajustes no próprio workflow.

This commit is contained in:
Esdras Renan 2025-10-09 16:30:41 -03:00
parent d9b1a80513
commit 43ef2bc239

View file

@ -5,6 +5,16 @@ on:
branches: [ main ]
tags:
- 'v*.*.*'
workflow_dispatch:
inputs:
force_web_deploy:
description: 'Forçar deploy do Web (ignorar filtro)?'
required: false
default: 'false'
force_convex_deploy:
description: 'Forçar deploy do Convex (ignorar filtro)?'
required: false
default: 'false'
env:
APP_DIR: /srv/apps/sistema
@ -41,7 +51,7 @@ jobs:
deploy:
name: Deploy (VPS Linux)
needs: changes
if: ${{ startsWith(github.ref, 'refs/heads/') && needs.changes.outputs.web == 'true' }}
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.force_web_deploy == 'true') || (startsWith(github.ref, 'refs/heads/') && needs.changes.outputs.web == 'true') }}
runs-on: [ self-hosted, linux, vps ]
steps:
- name: Checkout
@ -105,7 +115,7 @@ jobs:
convex_deploy:
name: Deploy Convex functions
needs: changes
if: ${{ needs.changes.outputs.convex == 'true' }}
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.force_convex_deploy == 'true') || needs.changes.outputs.convex == 'true' }}
runs-on: [ self-hosted, linux, vps ]
env:
APP_DIR: /srv/apps/sistema