Skip to content

ghpages

ghpages #196

Workflow file for this run

name: ghpages
on:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# 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: macos-latest
steps:
- uses: actions/checkout@v3
- name: Get Template
uses: actions/checkout@main
with:
repository: ansforge/IG-template-Nos
path: template_nos
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
# Persist the FHIR Package Cache between runners.
# Doc: https://confluence.hl7.org/display/FHIR/FHIR+Package+Cache
- name: 🗂️ Cache FHIR Packages
uses: actions/cache@v2
with:
path: |
~/.fhir/packages
key: fhir-packages
- name: Install modules
run: npm install -g fsh-sushi
- name: Run sushi
run: sushi .
# Persist the IG Publisher input-cache between runners.
# Doc: https://build.fhir.org/ig/FHIR/ig-guidance/using-templates.html#igroot-input-cache
- name: 🗂️ Cache IG Publisher input-cache
uses: actions/cache@v2
with:
path: |
igs/${{ env.IG }}/input-cache
key: ig-publisher-input-cache
# Downloads the newest version of the IG Publisher, this could probable be cached.
- name: 📥 Download IG Publisher
run: wget -q https://github.com/HL7/fhir-ig-publisher/releases/latest/download/publisher.jar
- name: Get branch names
id: branch-name
uses: tj-actions/[email protected]
- name: Build and test with Rake
run: |
sudo gem install jekyll
# Builds the HTML page for the IG.
- name: 🏃‍♂️ Run IG Publisher
run : java -Xmx10g -jar publisher.jar publisher -ig . -publish https://ansforge.github.io/IG-NOS/ig/${{ steps.branch-name.outputs.current_branch }}/ -tx
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Run script python
run: python download.py './temp/pages/' './template_nos/includes/template.download.html'
- name: Liste des repertoires
run : |
cd temp/pages/
ls -a
- name: Re-Run jekyll
run : jekyll build --destination "./output" --source "./temp/pages"
#- name: Install zip
# uses: montudor/action-zip@v1
- name: 1 ZIP JDV PDF
run : zip -rj ./output/NOS/NOS-jdv-pdf.zip ./input/images/NOS/JDV_*.pdf
- name: 1 ZIP JDV SVS
run : zip -rj ./output/NOS/NOS-jdv-svs.zip ./input/images/NOS/JDV_*.xml -x "*FHIR*"
- name: 1 ZIP JDV FHIR JSON
run : zip -rj ./output/NOS/NOS-jdv-fhir-json.zip ./input/images/NOS/JDV_*-FHIR.json
- name: 1 ZIP JDV FHIR XML
run : zip -rj ./output/NOS/NOS-jdv-fhir-xml.zip ./input/images/NOS/JDV_*-FHIR.xml
- name: 1 ZIP JDV FHIR tabs
run : zip -rj ./output/NOS/NOS-jdv-tabs.zip ./input/images/NOS/JDV_*.tabs
- name: 2 ZIP TRE PDF
run : zip -rj ./output/NOS/NOS-tre-pdf.zip ./input/images/NOS/TRE_*.pdf
- name: 2 ZIP TRE SVS
run : zip -rj ./output/NOS/NOS-tre-svs.zip ./input/images/NOS/TRE*.xml -x "*FHIR*"
- name: 2 ZIP TRE FHIR JSON
run : zip -rj ./output/NOS/NOS-tre-fhir-json.zip ./input/images/NOS/TRE*-FHIR.json
- name: 2 ZIP TRE FHIR XML
run : zip -rj ./output/NOS/NOS-tre-fhir-xml.zip ./input/images/NOS/TRE*-FHIR.xml
- name: 2 ZIP TRE FHIR tabs
run : zip -rj ./output/NOS/NOS-tre-tabs.zip ./input/images/NOS/TRE*.tabs
- name: 3 ZIP ASS PDF
run : zip -rj ./output/NOS/NOS-ass-pdf.zip ./input/images/NOS/ASS_*.pdf
- name: 3 ZIP ASS SVS
run : zip -rj ./output/NOS/NOS-ass-svs.zip ./input/images/NOS/ASS*.xml -x "*FHIR*"
- name: 3 ZIP ASS FHIR JSON
run : zip -rj ./output/NOS/NOS-ass-fhir-json.zip ./input/images/NOS/ASS*-FHIR.json
- name: 3 ZIP ASS FHIR XML
run : zip -rj ./output/NOS/NOS-ass-fhir-xml.zip ./input/images/NOS/ASS*-FHIR.xml
- name: 3 ZIP ASS FHIR tabs
run : zip -rj ./output/NOS/NOS-ass-tabs.zip ./input/images/NOS/ASS*.tabs
- name: ZIP Ensemble des NOS au format CSV
run : zip -rj ./output/NOS/NOS-Fichiers_Publics.zip ./input/images/NOS/*.tabs
- name: ZIP Ensemble des NOS au format XML/SVS
run : zip -rj ./output/NOS/NOS-Fichiers_Publics-Versions_xml_svs.zip ./input/images/NOS/*.xml -x "*FHIR*"
- name: ZIP Ensemble des NOS au format JSON/FHIR (ZIP)
run : zip -rj ./output/NOS/NOS-Fichiers_Publics-Versions_json_fhir.zip ./input/images/NOS/*-FHIR.json
- name: ZIP Ensemble des NOS au format XML/FHIR (ZIP)
run : zip -rj ./output/NOS/Nos-fichiers_publics-versions_xml_fhir.zip ./input/images/NOS/*-FHIR.xml
- name: ZIP Jeux de valeurs du CI-SIS (ZIP
run : zip -rj ./output/NOS/NOS-Jeux_de_Valeurs_CI-SIS.zip ./input/images/NOS/*CISIS*
#- name: Minify
# run : |
# brew install tdewolff/tap/minify
# minify -r -o out/ ./output
# 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: out
destination_dir: ig/${{ steps.branch-name.outputs.current_branch }}
exclude_assets: '**.zip'
commit_message: ' ${{ github.event.head_commit.message }}'