-
Notifications
You must be signed in to change notification settings - Fork 3
30 lines (29 loc) · 1.17 KB
/
cicd_process.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
name: deploy to test instance
on:
push:
branches: [ cicd ]
jobs:
build:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: executing remote connection
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.CICD_SECRET }}
port: ${{ secrets.PORT }}
script: |
git config --global --add safe.directory /apps/github-workflows/mhealth-apps/psurvey
cd /apps/github-workflows/mhealth-apps/psurvey/
git pull origin master
git status
cp /apps/dockerApps/psurvey/python.dockerfile /apps/github-workflows/mhealth-apps/psurvey
cp /apps/dockerApps/psurvey/nginx.dockerfile /apps/github-workflows/mhealth-apps/psurvey
cp /apps/dockerApps/psurvey/secrets.json /apps/github-workflows/mhealth-apps/psurvey
cp /apps/dockerApps/psurvey/pSurvey/settings.py /apps/github-workflows/mhealth-apps/psurvey
cp -r /apps/dockerApps/psurvey/docker/ /apps/github-workflows/mhealth-apps/psurvey
docker-compose down
docker-compose rm -f
docker-compose up --build -d