add event level support #58
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 to main | |
on: | |
push: | |
branches: [meili] | |
jobs: | |
server-ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Push code to remote | |
uses: burnett01/rsync-deployments@5.2.1 | |
with: | |
switches: -avzr --delete --exclude "history/migrations" | |
remote_path: src/gdhistory/ | |
remote_host: ${{ secrets.HOST }} | |
remote_port: ${{ secrets.PORT }} | |
remote_user: ${{ secrets.USERNAME }} | |
remote_key: ${{ secrets.SSH_KEY }} | |
- name: Restart Server | |
uses: appleboy/ssh-action@v0.1.6 | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
password: ${{ secrets.PASSWORD }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
bash -c 'source ~/venv/website/bin/activate; cd ~/src/gdhistory; pip install -r requirements.txt; python manage.py collectstatic --no-input; python manage.py makemigrations && python manage.py migrate' | |
sudo /usr/bin/systemctl restart gdhistory-gunicorn.service | |
sudo /usr/bin/systemctl restart gdhistory-celery.service |