diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index c05fa83..81f7bc8 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -1,9 +1,9 @@ -name: Deploy Smart Search Backend +name: Deploy Smart Search Backend Test on: push: branches: - - main + - test jobs: deploy: @@ -16,7 +16,7 @@ jobs: run: apk add --no-cache git openssh-client - name: Checkout code - run: git clone --depth 1 https://git.techease.ru/Smart-search/smart-search-back.git /app && cd /app + run: git clone --depth 1 --branch test 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:latest . + docker build -t smart-search-backend-test:latest . - - name: Deploy to server + - name: Deploy to test server run: | mkdir -p ~/.ssh echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa chmod 600 ~/.ssh/id_rsa - 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' + 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' - name: Done - run: echo "✅ Backend deployed!" + run: echo "✅ Test backend deployed!"