ci: only run Convex deploy when files in convex/** change (paths-filter)
This commit is contained in:
parent
2b707379bb
commit
f9268346ea
1 changed files with 18 additions and 1 deletions
19
.github/workflows/ci-cd-web-desktop.yml
vendored
19
.github/workflows/ci-cd-web-desktop.yml
vendored
|
|
@ -11,6 +11,22 @@ env:
|
|||
VPS_UPDATES_DIR: /var/www/updates
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
name: Detect changes
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
convex: ${{ steps.filter.outputs.convex }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Paths filter
|
||||
id: filter
|
||||
uses: dorny/paths-filter@v3
|
||||
with:
|
||||
filters: |
|
||||
convex:
|
||||
- 'convex/**'
|
||||
|
||||
deploy:
|
||||
name: Deploy (VPS Linux)
|
||||
if: ${{ startsWith(github.ref, 'refs/heads/') }}
|
||||
|
|
@ -61,7 +77,8 @@ jobs:
|
|||
|
||||
convex_deploy:
|
||||
name: Deploy Convex functions
|
||||
needs: deploy
|
||||
needs: [deploy, changes]
|
||||
if: ${{ needs.changes.outputs.convex == 'true' }}
|
||||
runs-on: [ self-hosted, linux, vps ]
|
||||
env:
|
||||
APP_DIR: /srv/apps/sistema
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue