-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 966 Bytes
/
rabbitmq.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Deploy
on:
push:
branches:
- dev
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy to server
run: |
ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
cd /home/nata_tchikhinashvili/auctions-g2
source .venv/bin/activate
git reset --hard
git pull --strategy-option theirs
git checkout dev
pip3 install -r requirements.txt
sudo systemctl daemon-reload
sudo systemctl restart rabbimq-listen
sudo systemctl restart celery
sudo systemctl restart celery-beats
EOF
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}