2026-08-08 14:03:15 +03:00
|
|
|
name: Deploy Dzen assistant
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
|
|
|
|
branches:
|
|
|
|
|
- main
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
deploy:
|
|
|
|
|
runs-on: docker
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout
|
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
- name: Upload application
|
2026-08-15 15:10:50 +03:00
|
|
|
uses: https://github.com/appleboy/scp-action@v0.1.7
|
2026-08-08 14:03:15 +03:00
|
|
|
with:
|
|
|
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
|
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
|
|
|
port: ${{ secrets.DEPLOY_PORT }}
|
|
|
|
|
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
|
|
|
source: "Dockerfile,README.md,admin,app,docker-compose.yml,requirements.txt,requirements-yt-dlp.txt,.dockerignore"
|
|
|
|
|
target: ${{ secrets.DEPLOY_PATH }}
|
|
|
|
|
overwrite: true
|
|
|
|
|
rm: false
|
|
|
|
|
|
|
|
|
|
- name: Rebuild and restart services
|
2026-08-15 15:10:50 +03:00
|
|
|
uses: https://github.com/appleboy/ssh-action@v1.2.2
|
2026-08-08 14:03:15 +03:00
|
|
|
with:
|
|
|
|
|
host: ${{ secrets.DEPLOY_HOST }}
|
|
|
|
|
username: ${{ secrets.DEPLOY_USER }}
|
|
|
|
|
port: ${{ secrets.DEPLOY_PORT }}
|
|
|
|
|
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
|
|
|
|
script: |
|
|
|
|
|
set -eu
|
|
|
|
|
cd "${{ secrets.DEPLOY_PATH }}"
|
2026-08-11 13:06:41 +03:00
|
|
|
docker compose build api worker beat
|
2026-08-08 14:03:15 +03:00
|
|
|
docker compose up -d api worker beat
|
|
|
|
|
docker compose ps
|