added sending threshold #79
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 Django Application | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checking out repository | |
uses: actions/checkout@v2 | |
- name: SSH and Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SERVER_HOST }} | |
username: ${{ secrets.SERVER_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
script: | | |
set -e # fail on any error | |
cd /home/biagio/sins-love-and-rainbows | |
git pull | |
source .venv/bin/activate | |
poetry install | |
cd src | |
python manage.py migrate | |
python manage.py collectstatic --noinput | |
sudo systemctl restart sinsloveandrainbows | |
sudo systemctl restart celery-slr | |
sudo systemctl restart celery-beat-slr | |
echo "Successful deployment $(date)" >> deployments.info |