DocBook Build -- volume15-Return-Investment -- main #81
This file contains hidden or 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: DocBook Build | |
| run-name: DocBook Build -- ${{ github.event.inputs.module }} -- ${{github.ref_name || github.head_ref}} | |
| on: | |
| # push: | |
| # pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| module: | |
| description: 'choose modules to build' | |
| required: true | |
| type: choice | |
| options: | |
| - -- SELECT -- | |
| - All | |
| - book | |
| - volume1-Introduction | |
| - volume2-Background | |
| - volume3-IKM-Overview | |
| - volume4-Tinkar-Ballot | |
| - volume5-Knowledge-Layers | |
| - volume6-ANF-Ballot | |
| - volume7-Use-Cases | |
| - volume8-Komet-User-Guide | |
| - volume9-Wisdom-of-Crowds | |
| - volume10-Patient-Data-Privacy | |
| - volume11-Healthcare-Data-Management | |
| - volume12-Healthcare-Quality-Improvement | |
| - volume13-Global-Health-International-Collaboration | |
| - volume14-Emergency-Preparedness | |
| - volume15-Return-Investment | |
| - volume16-Temporal-Relationships | |
| env: | |
| MODULE: ${{github.event.inputs.module}} | |
| jobs: | |
| build-job: | |
| name: Build Job -- ${{ github.event.inputs.module }} | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Fail if --SELECT-- chosen | |
| if: env.MODULE == '-- SELECT --' | |
| run: | | |
| echo "Please pick a valid module" | |
| exit 1 | |
| - name: checkout repo | |
| uses: actions/checkout@v4 | |
| - name: install java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' # See 'Supported distributions' for available options | |
| java-version: '23' | |
| - name: Determine Choice | |
| id: module_choice_arg | |
| run: | | |
| if [ "$CHOSEN_MODULE" == "All" ]; then | |
| echo "BUILD_ARG=-Pall-modules" >> $GITHUB_OUTPUT | |
| else | |
| echo "BUILD_ARG=-D'module-name=${{ github.event.inputs.module }}'" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| CHOSEN_MODULE: ${{env.MODULE}} | |
| - name: Build Selected Module -- ${{ github.event.inputs.module }} | |
| run: | | |
| echo "Building module: ${{ github.event.inputs.module }}" | |
| mvn clean install -U -D'maven.build.cache.enabled=false' ${{steps.module_choice_arg.outputs.BUILD_ARG}} | |
| - name: Upload Generated PDF -- ${{ github.event.inputs.module }} | |
| if: env.MODULE != 'All' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.event.inputs.module }}-pdf | |
| path: ${{ github.event.inputs.module }}/target/site/docbook/*.pdf | |