Skip to content

refactor: removed tight coupling with database (12fac IV) #2

refactor: removed tight coupling with database (12fac IV)

refactor: removed tight coupling with database (12fac IV) #2

Workflow file for this run

name: Deploy the backend
# Only deploy when version tags (eg: v1.0.0) are pushed
on:
push:
tags:
- "v*.*.*"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Update homeserver and restart it
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd src/Backend
git fetch origin
git reset --hard ${{ github.ref_name }}
source .venv/bin/activate
python3 manage.py migrate
sudo systemctl restart webserver.service