Files
backend/.github/workflows/deploy.yml
A'zamov Samandar 0229a0595c
Some checks failed
Deploy Django Application to Server / deploy (push) Failing after 19s
Telegram Notifications / Telegram Gate (push) Failing after 5s
gealogiuya
2026-02-27 14:56:23 +05:00

28 lines
800 B
YAML

name: Deploy Django Application to Server
on:
push:
branches:
- main # Bu yerda kodni qaysi branch'dan push qilganda deploy ishga tushishini ko'rsatasiz
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Repositoryni GitHub'dan olish
uses: actions/checkout@v2
- name: Serverga SSH orqali ulanish
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
cd ${{ secrets.DEPLOY_PATH }}
git pull origin main
docker compose up --build -d
docker image prune -f
echo "Deploy jarayoni muvaffaqiyatli yakunlandi!"