-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1.12 KB
/
deploy-test.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
36
37
38
39
name: Sroom-AI-Deploy-Test
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_KEY }}
aws-region: ap-northeast-2
- name: Deploy Test Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.AWS_SSH_TEST_HOST }}
username: ubuntu
key: ${{ secrets.SSH_SECRET_KEY }}
script_stop: true
script: |
cd sroom-ai/
git fetch
git checkout '${{ github.event.pull_request.head.ref }}'
git pull
pip3 install -r requirements.txt
tmux send-keys -t celery "^C" C-m
tmux send-keys -t server "^C" C-m
tmux send-keys -t server "python3 main.py server" C-m
tmux send-keys -t celery "celery -A celery_app worker --concurrency=2 -l info" C-m