Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
MaryKilewe committed Jan 19, 2024
2 parents 427e588 + 20d5386 commit d7d4154
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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"

0 comments on commit d7d4154

Please sign in to comment.