Skip to content

update file

update file #11

Workflow file for this run

name: Oqtepalavash API
on:
push:
branches: [ main ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: 2.59.40.214
username: root
password: ${{ secrets.SERVER_CODE }}
key: ${{ secrets.SSH_KEY }}
script: |
cd /var/www/oqtepalavash/backend
git pull
source venv/bin/activate
pip install -r requirements.txt
python3 manage.py migrate
systemctl restart oqtepalavash.service
systemctl reload nginx.service