diff --git a/.gitea/workflows/deploy-production.yml b/.gitea/workflows/deploy-production.yml index acc616d..35007ae 100644 --- a/.gitea/workflows/deploy-production.yml +++ b/.gitea/workflows/deploy-production.yml @@ -11,14 +11,18 @@ jobs: runs-on: docker container: image: docker:latest + volumes: + - /opt/apps/api-finance:/app steps: - name: Install git run: apk add --no-cache git - - name: Clone repository - run: git clone --depth 1 https://git.ai-assistant-bot.xyz/root/finance-api.git . + - name: Pull latest code + run: | + cd /app + git pull origin main || git clone --depth 1 https://git.ai-assistant-bot.xyz/root/finance-api.git . - name: Build & Deploy run: | - docker compose -f docker-compose.server.yml build - docker compose -f docker-compose.server.yml up -d + cd /app + docker compose -f docker-compose.server.yml up -d --build