-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/palladiumkenya/SyncAllEMRs
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||