Skip to content

Redeploy openmrs only #9

Redeploy openmrs only

Redeploy openmrs only #9

Workflow file for this run

name: Deploy to VM
on:
push:
branches:
- main
workflow_dispatch:
env:
SSH_PORT: 22
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up SSH agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Remote ssh to server and update docker-compose
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
port: ${{ env.SSH_PORT }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script_stop: true
script: |
cd /opt/bdsec-repos/Bdsec-metadata
sudo git pull origin main
cd /opt/bdsec-repos/bahmni-docker/bahmni-standard
sudo docker-compose down
sudo docker-compose down -v openmrs
sudo docker-compose up -d