diff --git a/.github/workflows/ohri-dev.yml b/.github/workflows/ohri-dev.yml index 71bae8b21..10db3a747 100644 --- a/.github/workflows/ohri-dev.yml +++ b/.github/workflows/ohri-dev.yml @@ -117,3 +117,70 @@ jobs: cache-to: type=gha,mode=max - name: Save image digest run: echo "::set-output name=image::${{ steps.build-and-push.output.digest }}" + + dev_server_status: + if: github.ref == 'refs/heads/dev-deploy' + runs-on: ubuntu-latest + + steps: + - name: Wait for 5 minutos - Let Images reflect on Docker Hub + run: sleep 300 + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Copy files to /home/runner/ + run: | + ls -la -t + cp -r $GITHUB_WORKSPACE/.ssh/ /home/runner/ + + - name: List contents of /home/runner/ + run: ls -la /home/runner/ + + - name: webfactory/ssh-agent + uses: webfactory/ssh-agent@v0.8.0 + with: + ssh-private-key: ${{ secrets.LL_SSH_PRIVATE_KEY }} + + - name: Check SSH to remote OHRI Dev status + run: | + ssh-keygen -R 172.19.0.16 + + dev_server_connection_dev: + runs-on: ubuntu-latest + needs: dev_server_status + steps: + - name: SSH to remote OHRI Dev server + run: | + ssh -o StrictHostKeyChecking=no -T llemos@172.19.0.16 -p 2216 -J llemos@20.172.182.46 -p 2202 + ls -la -t && \ + cd /opt && \ + ls -la -t + + dev_deploy: + runs-on: ubuntu-latest + needs: dev_server_status + + if: (github.event_name == 'push' || github.event.pull_request.merged) + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: webfactory/ssh-agent + uses: webfactory/ssh-agent@v0.8.0 + + with: + ssh-private-key: ${{ secrets.LL_SSH_PRIVATE_KEY }} + + - name: SSH to remote OHRI Dev server via jump host + run: | + ssh -p 2216 \ + -o "UserKnownHostsFile=/dev/null" \ + -o "StrictHostKeyChecking=no" \ + -o "ProxyCommand=ssh -o StrictHostKeyChecking=no -W %h:%p llemos@20.172.182.46 -p 2202" \ + llemos@172.19.0.16 "\ + cd /opt && \ + docker compose -f docker-compose-ohri-dev.yml pull && \ + docker compose -f docker-compose-ohri-dev.yml stop && \ + docker compose -f docker-compose-ohri-dev.yml up -d" + \ No newline at end of file diff --git a/frontend/ohri-config.json b/frontend/ohri-config.json index ac4699678..171420105 100644 --- a/frontend/ohri-config.json +++ b/frontend/ohri-config.json @@ -79,6 +79,12 @@ "@ohri/openmrs-esm-ohri-pmtct": { "identifiers": { "preferredIdentifierSource": "8549f706-7e85-4c1d-9424-217d50a2988b" + }, + "encounterTypes": { + "antenatal": "677d1a80-dbbe-4399-be34-aa7f54f11405", + "laborAndDelivery": "6dc5308d-27c9-4d49-b16f-2c5e3c759757", + "infantPostnatal": "af1f1b24-d2e8-4282-b308-0bf79b365584", + "motherPostnatal": "269bcc7f-04f8-4ddc-883d-7a3a0d569aad" } } }