Files
legal-ai/.gitea/workflows/deploy.yaml
Chaim 34fa923a2b
Some checks failed
Build & Deploy / build-and-deploy (push) Has been cancelled
Update CI deploy target to unified legal-ai app UUID
The old legal-ai-web app (my85gabx...) was deleted — consolidated into
a single ezer-mishpati-web (a99ivjv...) serving both domains.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 13:46:26 +00:00

59 lines
1.7 KiB
YAML

name: Build & Deploy
on:
push:
branches: [main]
tags: ["v*"]
env:
REGISTRY: gitea.nautilus.marcusgroup.org
IMAGE: ezer-mishpati/legal-ai
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: |
echo "${{ secrets.REGISTRY_PASSWORD }}" | \
docker login ${{ env.REGISTRY }} \
-u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: Build and tag image
run: |
BASE="${{ env.REGISTRY }}/${{ env.IMAGE }}"
TAGS="-t ${BASE}:latest -t ${BASE}:build-${{ github.run_number }}"
# If this is a version tag (v*), add the semver tag
REF="${{ github.ref }}"
if [[ "$REF" == refs/tags/v* ]]; then
VERSION="${REF#refs/tags/}"
TAGS="$TAGS -t ${BASE}:${VERSION}"
echo "📦 Release: ${VERSION}"
fi
echo "🏗️ Building with tags: build-${{ github.run_number }}, latest"
docker build $TAGS .
- name: Push image
run: |
BASE="${{ env.REGISTRY }}/${{ env.IMAGE }}"
docker push "${BASE}:latest"
docker push "${BASE}:build-${{ github.run_number }}"
REF="${{ github.ref }}"
if [[ "$REF" == refs/tags/v* ]]; then
VERSION="${REF#refs/tags/}"
docker push "${BASE}:${VERSION}"
echo "✅ Pushed ${VERSION}"
fi
- name: Trigger Coolify redeploy
run: |
curl -sf \
"http://coolify:8080/api/v1/deploy?uuid=a99ivjvglmqxnfbcgtdn56e5&force=true" \
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}"