-
Notifications
You must be signed in to change notification settings - Fork 0
31 lines (27 loc) · 865 Bytes
/
deploy.yml
File metadata and controls
31 lines (27 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Deploy Bot
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up SSH
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Add SSH key fingerprint
run: |
mkdir -p ~/.ssh
ssh-keyscan ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts
- name: Deploy to VPS
run: |
ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} "
cd /home/prl412/bots/blind &&
git pull origin main &&
# Si usas requirements.txt:
/home/prl412/.local/bin/poetry install
# Reiniciar el bot (ajusta según tu configuración)
systemctl --user restart telegrambot.service
"