Skip to content

update CI/CD

update CI/CD #12

Workflow file for this run

name: Django CI/CD
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
python manage.py test
- name: Deploy to server
uses: easingthemes/ssh-deploy@v2
with:
username: ${{ secrets.SSH_USER }}
host: ${{ secrets.SSH_HOST }}
port: ${{ secrets.SSH_PORT }}
privateKey: ${{ secrets.SSH_PRIVATE_KEY }}
source: /var/www/oqtepalavash/backend
target: /var/www/oqtepalavash/backend