Merge pull request #2 from pvpeuve/feature/descargar-download-script #14
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| " |