Skip to content

Update docker-image.yml #9

Update docker-image.yml

Update docker-image.yml #9

Workflow file for this run

name: Deployment CICD
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: executing remote connection
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.CICD_HOST }}
username: ${{ secrets.CICD_USERNAME }}
key: ${{ secrets.CICD_SECRET }}
port: ${{ secrets.PORT }}
script: |
cd /apps/githubworkflows/
sudo chown -R cicd:cicd SyncAllEMRs
git config --global --add safe.directory /apps/githubworkflows/SyncAllEMRs
cd SyncAllEMRs && git pull https://github.com/palladiumkenya/SyncAllEMRs.git
sudo cp /apps/dockerApps/SyncAllEMRs/Dockerfile .
sudo cp /apps/dockerApps/SyncAllEMRs/docker-compose.yml .
sudo cp /apps/dockerApps/SyncAllEMRs/.env .
sudo docker-compose stop dwh_his_sync_allemrs && docker-compose rm -f dwh_his_sync_allemrs
sudo docker-compose up -d
echo "done"