add service
Some checks failed
Deploy Smart Search Backend / deploy (push) Has been cancelled

This commit is contained in:
vallyenfail
2026-01-18 00:45:02 +03:00
parent 068f8ac10e
commit 175e49ea91

View File

@@ -1,9 +1,9 @@
name: Deploy Smart Search Backend Test
name: Deploy Smart Search Backend
on:
push:
branches:
- test
- main
jobs:
deploy:
@@ -16,7 +16,7 @@ jobs:
run: apk add --no-cache git openssh-client
- name: Checkout code
run: git clone --depth 1 --branch test https://git.techease.ru/Smart-search/smart-search-back.git /app && cd /app
run: git clone --depth 1 https://git.techease.ru/Smart-search/smart-search-back.git /app && cd /app
- name: Login to Docker Hub
run: |
@@ -25,15 +25,15 @@ jobs:
- name: Build Docker image
run: |
cd /app
docker build -t smart-search-backend-test:latest .
docker build -t smart-search-backend:latest .
- name: Deploy to test server
- name: Deploy to server
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H test-1xc5f.techease.ru >> ~/.ssh/known_hosts 2>/dev/null || true
ssh -i ~/.ssh/id_rsa root@test-1xc5f.techease.ru 'cd /home/n8n && /usr/bin/docker compose up -d smart-search-backend'
ssh-keyscan -H 185.185.142.203 >> ~/.ssh/known_hosts 2>/dev/null || true
ssh -i ~/.ssh/id_rsa root@185.185.142.203 'cd /home/n8n && /usr/bin/docker compose up -d smart-search-backend'
- name: Done
run: echo "✅ Test backend deployed!"
run: echo "✅ Backend deployed!"