Skip to content

KenyaEMR 3.x 18.6.2 Platform upgrade script update #9

KenyaEMR 3.x 18.6.2 Platform upgrade script update

KenyaEMR 3.x 18.6.2 Platform upgrade script update #9

name: KenyaEMR OpenMRS React forms
'on':
push:
branches:
- react-forms
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 18.x
steps:
- uses: actions/checkout@v3
- name: 'Use Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v3
- uses: actions/checkout@v2
- name: Run script file
run: |
chmod +x ./dev-react-forms-build.sh
sh ./dev-react-forms-build.sh
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: frontend
path: |
frontend
- name: Upload frontend to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.CICD_HOST }}
username: ${{ secrets.CICD_USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.CICD_SECRET }}
source: ./frontend/
target: /apps/githubworkflows/ohri_openmrs8700
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.CICD_HOST }}
username: ${{ secrets.CICD_USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.CICD_SECRET }}
script: >-
${{ secrets.DOCKER8700 }}
release:
runs-on: ubuntu-latest
if: github.event_name == 'release'
strategy:
matrix:
node-version:
- 18.x
steps:
- uses: actions/checkout@v3
- name: 'Use Node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v3
- name: Run production build script
run: |
chmod +x ./prod-build.sh
sh ./prod-build.sh
shell: bash
- name: Upload release artifacts
uses: actions/upload-artifact@v3
with:
name: frontend
path: |
frontend
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./frontend.zip
asset_name: frontend
asset_content_type: application/