Skip to content

Update cicd_process.yml #88

Update cicd_process.yml

Update cicd_process.yml #88

Workflow file for this run

name: deploy to test instance
on:
push:
branches: [ dev ]
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: |
cd /apps/github-workflows/mhealth-apps/
sudo rm -rf psurvey
sudo mkdir psurvey
sudo chown -R cicd2:cicd2 psurvey
git config --global --add safe.directory /apps/github-workflows/mhealth-apps/psurvey
cd psurvey/
git clone -b dev https://github.com/palladiumkenya/psurvey.git .
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/pSurvey
# cp -r /apps/dockerApps/psurvey/docker/ /apps/github-workflows/mhealth-apps/psurvey.
docker-compose stop pythonapp
docker-compose rm -f pythonapp
docker-compose up -d pythonapp