gealogiuya
This commit is contained in:
27
.github/workflows/deploy.yml
vendored
Normal file
27
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
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!"
|
||||
26
.github/workflows/notify.yml
vendored
Normal file
26
.github/workflows/notify.yml
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
name: Telegram Notifications
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
[opened, closed, edited, ready_for_review, review_requested, reopened]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Telegram Gate
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Notifier
|
||||
uses: ethyaan/tgate-action@v1.0.0
|
||||
if: always()
|
||||
with:
|
||||
token: ${{ secrets.TOKEN }}
|
||||
to: ${{ secrets.CHAT_ID }}
|
||||
disable_web_page_preview: true
|
||||
disable_notification: false
|
||||
Reference in New Issue
Block a user