Added Missing Form Clinical Encounter (#211) #105
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
name: Deploy configuration folder to server | |
on: | |
push: | |
branches: | |
- ampath-forms-configs | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
id: checkout | |
with: | |
ref: ampath-forms-configs | |
- name: Copy folder to server | |
id: copy-folder | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.CICD_HOST }} | |
username: ${{ secrets.CICD_USERNAME }} | |
port: ${{ secrets.PORT }} | |
key: ${{ secrets.CICD_SECRET }} | |
source: "configuration/ampathforms" | |
target: "/apps/githubworkflows/OpenMrs3.0_assets" | |
- name: Move and Remove Old Configuration | |
id: ssh | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.CICD_HOST }} | |
username: ${{ secrets.CICD_USERNAME }} | |
port: ${{ secrets.PORT }} | |
key: ${{ secrets.CICD_SECRET }} | |
script: | | |
sudo mv /var/lib/OpenMRS/configuration/ampathforms /apps/githubworkflows/OpenMrs3.0_assets/configuration/old_ampath | |
sudo mv /apps/githubworkflows/OpenMrs3.0_assets/configuration/ampathforms /var/lib/OpenMRS/configuration/ | |
sudo rm -rf /apps/githubworkflows/OpenMrs3.0_assets/configuration/old_ampath | |
sudo rm -rf /var/lib/OpenMRS/configuration_checksums/ampathforms | |
- name: Restart Server | |
id: restart | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.CICD_HOST }} | |
username: ${{ secrets.CICD_USERNAME }} | |
port: ${{ secrets.PORT }} | |
key: ${{ secrets.CICD_SECRET }} | |
script: sudo service tomcat9 restart |