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:
parent
d9b1a80513
commit
43ef2bc239
1 changed files with 12 additions and 2 deletions
14
.github/workflows/ci-cd-web-desktop.yml
vendored
14
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -5,6 +5,16 @@ on:
|
||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
tags:
|
tags:
|
||||||
- 'v*.*.*'
|
- '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:
|
env:
|
||||||
APP_DIR: /srv/apps/sistema
|
APP_DIR: /srv/apps/sistema
|
||||||
|
|
@ -41,7 +51,7 @@ jobs:
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy (VPS Linux)
|
name: Deploy (VPS Linux)
|
||||||
needs: changes
|
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 ]
|
runs-on: [ self-hosted, linux, vps ]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
|
|
@ -105,7 +115,7 @@ jobs:
|
||||||
convex_deploy:
|
convex_deploy:
|
||||||
name: Deploy Convex functions
|
name: Deploy Convex functions
|
||||||
needs: changes
|
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 ]
|
runs-on: [ self-hosted, linux, vps ]
|
||||||
env:
|
env:
|
||||||
APP_DIR: /srv/apps/sistema
|
APP_DIR: /srv/apps/sistema
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue