Skip to content

Commit

Permalink
Create ci.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Murithijoshua authored Aug 14, 2024
1 parent 1134038 commit 7b8d2e2
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Greetings

on:
push:
branches: [master]

jobs:
dev_server_deployment:
name: deploying to 3.x dev instance
if: github.ref == 'refs/heads/master'
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 }}
command_timeout: 200m
script: |
cd /apps/githubworkflows/kenyaemr-modules
sudo rm -rf openmrs-module-kenyaEMRCashier
sudo mkdir openmrs-module-kenyaEMRCashier
sudo chown -R cicd:cicd openmrs-module-kenyaEMRCashier
git config --global --add safe.directory /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaEMRCashier
cd /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaEMRCashier
git clone -b master https://github.com/palladiumkenya/openmrs-module-kenyaEMRCashier .
git status
mvn license:format
sudo mvn clean install -DskipTests
sudo rm -rf /var/lib/OpenMRS/modules/kenyaEMRCashier*.omod
sudo cp -r /apps/githubworkflows/kenyaemr-modules/openmrs-module-kenyaEMRCashier/omod/target/*.omod /var/lib/OpenMRS/modules/
sudo chown -R tomcat:tomcat /var/lib/OpenMRS/modules/
sudo chmod +r /var/lib/OpenMRS/modules/*.omod
sudo chmod 755 /var/lib/OpenMRS/modules/*.omod
sudo service tomcat9 restart

0 comments on commit 7b8d2e2

Please sign in to comment.