File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Server
2+
3+ on :
4+ push :
5+ branches :
6+ - main # Срабатывает при пуше в ветку main
7+
8+ jobs :
9+ deploy :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Deploy via SSH
13+ uses : appleboy/ssh-action@master
14+ with :
15+ host : ${{ secrets.HOST }}
16+ username : ${{ secrets.USERNAME }}
17+ key : ${{ secrets.SSH_KEY }}
18+ port : 22
19+ script : |
20+ # 1. Переходим в папку с ботом (УКАЖИ СВОЙ ПУТЬ!)
21+ cd /home/bot/balance_bot/
22+
23+ # 2. Скачиваем изменения
24+ git pull origin main
25+
26+ # 3. Активируем виртуальное окружение и обновляем библиотеки (если надо)
27+ source venv/bin/activate
28+ pip install -r requirements.txt
29+
30+ # 4. Перезапускаем бота
31+ # Для этого бот должен быть запущен через systemd (см. ниже)
32+ systemctl restart balance-bot
Original file line number Diff line number Diff line change 1+ aiogram >= 3.0.0
2+ sqlalchemy >= 2.0.0
3+ aiohttp
4+ python-dotenv
5+ aiosqlite
6+ pytz
You can’t perform that action at this time.
0 commit comments