Skip to content

update CI/CD

update CI/CD #16

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@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Deploy to server
uses: easingthemes/ssh-deploy@v3
with:
REMOTE_USERNAME: ${{ secrets.SSH_USER }}
REMOTE_HOST: ${{ secrets.SSH_HOST }}
REMOTE_PORT: ${{ secrets.SSH_PORT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SOURCE: /var/www/oqtepalavash/backend
TARGET: /var/www/oqtepalavash/backend