by side #12
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: Build IG | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
push: | |
branches: | |
- '**' | |
# The following jobs are equal for all IGs and can be moved to a common composite-action if 'uses'-support is added, see: | |
# https://github.com/actions/runner/blob/main/docs/adrs/1144-composite-actions.md | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Build and test with Rake | |
run: | | |
sudo apt-get update | |
sudo apt-get install ruby-full | |
sudo gem install jekyll | |
- name: Install modules | |
run: npm install -g fsh-sushi | |
- name: Setup Java 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 21 | |
distribution: adopt | |
- name: Get the repo name | |
id: repo_name | |
run: echo "::set-output name=repo::$(echo ${{ github.repository }} | cut -d '/' -f 2)" | |
shell: bash | |
- name: π₯ Download IG Publisher | |
run: | | |
cd /home/runner/work/${{ steps.repo_name.outputs.repo }} | |
wget -q https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ github.repository }} | |
path: ${{ steps.repo_name.outputs.repo }} | |
# Builds the HTML page for the IG. | |
- name: πββοΈ Run IG Publisher | |
timeout-minutes: 45 # We need a long timeout here | |
run: | | |
cd /home/runner/work/${{ steps.repo_name.outputs.repo }}/${{ steps.repo_name.outputs.repo }} | |
java -Xmx8192m -jar ../publisher.jar -ig . | |
cd .. | |
- uses: actions/checkout@v4 | |
with: | |
repository: hl7ch/ig-release | |
path: ig-release | |
- uses: actions/checkout@v4 | |
with: | |
repository: hl7ch/hl7ch.github.io | |
path: ig-release/hl7ch.github.io | |
- name: List path | |
run: ls -R ./ | |
- name: πββοΈ Run Publication | |
timeout-minutes: 45 # We need a long timeout here | |
run: | | |
cd /home/runner/work/${{ steps.repo_name.outputs.repo }}/ig-release | |
java -jar -Dfile.encoding=UTF-8 -Xms3550m -Xmx3550m ../publisher.jar -go-publish -source $PWD/../${{ steps.repo_name.outputs.repo }} -web $PWD/hl7ch.github.io -registry ig-registry/fhir-ig-list.json -history ig-history -templates hl7ch.github.io/templates -temp $PWD/buildtmp | |
cd .. | |
# Publishes the HTML page to a seperate branch in order to host it using GitHub-Pages. | |
# This will overwrite the currently published HTML page. | |
# - name: π Deploy to GitHub-Pages | |
# uses: peaceiris/actions-gh-pages@v3 | |
# with: | |
# github_token: ${{ secrets.GITHUB_TOKEN }} | |
# publish_dir: ./igSource/output | |
# destination_dir: ig/${{ steps.branch-name.outputs.current_branch }} | |
# exclude_assets: '**.zip,**.tgz,**.pack' | |
# commit_message: ' ${{ github.event.head_commit.message }}' |