ci: always run stack deploy + service restarts (remove invalid hashFiles condition)

This commit is contained in:
Esdras Renan 2025-10-08 18:09:49 -03:00
parent 2659455a9f
commit d4616f757a

View file

@ -69,19 +69,16 @@ jobs:
pnpm prisma:generate pnpm prisma:generate
pnpm build pnpm build
- name: Optional Swarm deploy (stack.yml) - name: Swarm deploy (stack.yml)
if: ${{ hashFiles(format('{0}/stack.yml', env.APP_DIR)) != '' }}
run: | run: |
cd "$APP_DIR" cd "$APP_DIR"
RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema RELEASE_SHA=${{ github.sha }} docker stack deploy --with-registry-auth -c stack.yml sistema
- name: Ensure web service restarts with new code - name: Restart web service with new code
if: ${{ hashFiles(format('{0}/stack.yml', env.APP_DIR)) != '' }}
run: | run: |
docker service update --force sistema_web || true docker service update --force sistema_web || true
- name: (Optional) Restart Convex backend service - name: Restart Convex backend service (optional)
if: ${{ hashFiles(format('{0}/stack.yml', env.APP_DIR)) != '' }}
run: | run: |
docker service update --force sistema_convex_backend || true docker service update --force sistema_convex_backend || true