Skip to content

fix CI/CD file

fix CI/CD file #21

Workflow file for this run

name: Oqtepalavash server
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: ${{ secrets.SERVER_HOST }}
password: ${{ secrets.SERVER_PASSWORD }}
key: ${{ secrets.SECRET_KEY_GITHUB }}
# port: ${{ secrets.PORT }}
script: |
cd /var/www/oqtepalavash/backend
git pull
source venv/bin/activate
pip install -r requirements.txt
systemctl restart oqtepalavash.service
systemctl reload nginx.service