From 6627a628537be36954f8ac44c9e5d6c0d0830b20 Mon Sep 17 00:00:00 2001 From: SailorUpiter Date: Fri, 10 Jul 2026 21:47:25 +0300 Subject: [PATCH] add ci depoy satge --- .github/workflows/ci.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c661084..7229a1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ env: # Переменные окружения PLATFORMS: linux/amd64,linux/arm64 jobs: # Список выполняемых джоб - check-changes: # джоба проверки изменений в файлах + need-deploy: # джоба проверки изменений в файлах runs-on: ubuntu-latest outputs: src_changed: ${{ steps.filter.outputs.src }} @@ -53,4 +53,22 @@ jobs: # Список выполняемых джоб ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }} cache-from: type=gha - cache-to: type=gha,mode=max \ No newline at end of file + cache-to: type=gha,mode=max + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Deploy over SSH + uses: appleboy/ssh-action@v0.1.6 + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.USER }} + key: ${{ secrets.KEY }} + script: | + cd /home/ubadmin/mkdocs + git pull origin main + docker compose down + docker compose up -d --build \ No newline at end of file