Skip to content

Fixed some errors when API is unavaliable #14

Fixed some errors when API is unavaliable

Fixed some errors when API is unavaliable #14

Workflow file for this run

name: Deploy
on:
push:
branches: [ master ]
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
env:
HOST: angron42.pp.ua
USERNAME: root
KEY: ${{ secrets.SSH_PRIVATE_KEY }}
PORT: 22
steps:
- name: Stop server
uses: appleboy/ssh-action@master
with:
host: HOST
username: USERNAME
key: KEY
port: PORT
script: |
screen -wipe
if screen -list | grep -q "dteubot"; then
screen -X -S dteubot quit;
fi
- name: Pull changes
uses: appleboy/ssh-action@master
with:
host: HOST
username: USERNAME
key: KEY
port: PORT
script: |
cd ~/dteubot
git pull -f origin master
- name: Setup
uses: appleboy/ssh-action@master
with:
host: HOST
username: USERNAME
key: KEY
port: PORT
script: |
cd ~/dteubot
pip install -r requirements.txt
cd ~/bot-data
echo '${{ secrets.ENV }}' > .env
python ~/dteubot/scripts/update_chat_configs.py chat-configs
- name: Run
uses: appleboy/ssh-action@master
with:
host: HOST
username: USERNAME
key: KEY
port: PORT
script: bash ~/bot-data/run.sh