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