Deploy #855
This file contains 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 | |
run-name: Deploy | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Restarting the bot | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USERNAME }} | |
PORT: ${{ secrets.PORT }} | |
KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
# --force-reinstall = paste it if you need to reinstall packages from some other same-version git-branch | |
script: | | |
cd ./AluBot | |
git pull | |
source venv/bin/activate | |
python3.12 -m pip install -U -r ./requirements.txt --force-reinstall | |
sudo systemctl restart alubot.service |