Updated Deploy yml #80
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 the IG | |
on: [pull_request] | |
jobs: | |
validate: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
# Install ruby | |
# https://github.com/ruby/setup-ruby | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
# Install Jekyll | |
# https://jekyllrb.com/docs/installation/ubuntu/ | |
- name: "Install Jekyll" | |
shell: bash | |
run: | | |
gem install jekyll bundler | |
jekyll -v | |
# Install node if SUSHI is needed | |
# https://github.com/actions/setup-node | |
- name: "Install Node.js" | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
# Install SUSHI if needed | |
- name: "Install SUSHI" | |
shell: bash | |
run: | | |
npm install -g [email protected] | |
sushi --version | |
sushi . | |
# Install GOFSH if needed | |
- name: "Install GOFSH" | |
shell: bash | |
run: | | |
npm install -g [email protected] | |
gofsh --version | |
# Install reproschema2fhir if needed | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
repository: kind-lab/reproschema-to-fhir | |
submodules: 'true' | |
path: './tofsh' | |
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }} | |
# Call Gofsh if needed | |
- name: Checkout | |
shell: bash | |
run: | | |
cd ./tofsh | |
pip install -e . | |
touch .env | |
git submodule update --init --recursive | |
echo -e "CODESYSTEM_URI = https://voicecollab.ai/fhir/CodeSystem/" >> .env | |
echo -e "VALUESET_URI = https://voicecollab.ai/fhir/ValueSet/" >> .env | |
echo -e "QUESTIONNAIRE_URI = https://voicecollab.ai/fhir/Questionnaire/" >> .env | |
echo -e "QUESTIONNAIRE_LANGUAGE = en" >> .env | |
echo -e "FHIR_QUESTIONNAIRE_MODE = AnswerOptions" >> .env | |
./job.sh | |
cd .. | |
cp -r ./tofsh/output/ fsh_files | |
gofsh fsh_files | |
rm -r ./input/fsh | |
cp -r gofsh/input/fsh ./input/fsh | |
sushi . | |
- name: "Download the IG Publisher" | |
shell: bash | |
run: | | |
mkdir ./input-cache | |
curl -sS -L https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar -o ./input-cache/publisher.jar | |
chmod +x ./input-cache/publisher.jar | |
- name: "Create IG" | |
shell: bash | |
run: | | |
java -jar -Xms4096M -Xmx6144M -XX:NewRatio=1 -XX:-UseAdaptiveSizePolicy input-cache/publisher.jar ig.ini |