feat: add Convex dashboard service and CI job to deploy functions to self-hosted backend

This commit is contained in:
Esdras Renan 2025-10-08 11:59:49 -03:00
parent 70d91b77c9
commit 8d55c37f82
3 changed files with 53 additions and 2 deletions

View file

@ -49,6 +49,22 @@ jobs:
cd "$APP_DIR"
docker stack deploy --with-registry-auth -c stack.yml sistema
convex_deploy:
name: Deploy Convex functions
needs: deploy
runs-on: [ self-hosted, linux, vps ]
env:
APP_DIR: /srv/apps/sistema
steps:
- name: Deploy functions to Convex self-hosted
run: |
docker run --rm -i \
-v "$APP_DIR":/app \
-w /app \
-e CONVEX_SELF_HOSTED_URL="${{ secrets.CONVEX_SELF_HOSTED_URL }}" \
-e CONVEX_SELF_HOSTED_ADMIN_KEY="${{ secrets.CONVEX_SELF_HOSTED_ADMIN_KEY }}" \
node:20-bullseye bash -lc "corepack enable && corepack prepare pnpm@9 --activate && pnpm install --frozen-lockfile --prod=false && pnpm exec convex deploy"
desktop_release:
name: Desktop Release (Windows)
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
@ -94,4 +110,3 @@ jobs:
**/bundle/**/*
target: ${{ env.VPS_UPDATES_DIR }}
overwrite: true