-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (100 loc) · 5.11 KB
/
build-ig.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Build IG
on:
schedule:
- cron: '00 4,10,15 * * *'
workflow_call:
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: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: igSource
- name: Install fhirpy
run : pip install fhirpy
- name: Install typing-extensions
run : pip install typing-extensions
- name: Install modules
run: npm install -g fsh-sushi
- name: Run sushi pour les DM
run: sushi ./igSource/DM
- name: Suppression des fichiers FSH
run: |
rm ./igSource/DM/input/fsh/*.fsh
rm ./igSource/DM/Done/GitHub/*.fsh
rm ./igSource/DM/Template/*.fsh
- name: Get From ontoserver
run: |
mkdir ./igSource/input/ontoserver
mkdir ./igSource/input/ontoserver/JDV
mkdir ./igSource/input/ontoserver/TRE
mkdir ./igSource/input/ontoserver/ASS
mkdir ./igSource/input/ontoserver/NamingSystem
cd ./igSource/tools
python ./upload.py
- name: List des repertoires
run: ls -R ./igSource/input
# 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: Build and test with Rake
run: |
sudo apt-get install ruby-full
sudo gem install jekyll
- name: Run sushi
run: sushi ./igSource
# Builds the HTML page for the IG.
- name: 🏃♂️ Run IG Publisher
run : |
cd ./igSource
java -Xmx16344m -jar ../publisher.jar -ig .
- name: Setup Python # Set Python version
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install saxon
run : pip install saxonche
- name: Run script python
run: |
cd ./igSource
python ./tools/transform.py './output' './tools/xsl'
- name: 1 ZIP des fichiers
run : |
cd ./igSource
zip -rj ./output/listFormat/jdv-svs.zip ./output/listFormat/ValueSet*-svs.xml -x "*FHIR*"
zip -rj ./output/listFormat/jdv-fhir-json.zip ./output/ValueSet*.json
zip -rj ./output/listFormat/jdv-fhir-xml.zip ./output/ValueSet*.xml
zip -rj ./output/listFormat/jdv-tabs.zip ./output/listFormat/ValueSet*.tabs
zip -rj ./output/listFormat/tre-svs.zip ./output/listFormat/CodeSystem*-svs.xml -x "*FHIR*"
zip -rj ./output/listFormat/tre-fhir-json.zip ./output/CodeSystem*.json
zip -rj ./output/listFormat/tre-fhir-xml.zip ./output/CodeSystem*.xml
zip -rj ./output/listFormat/tre-tabs.zip ./output/listFormat/CodeSystem*.tabs
- name: 1 ZIP des NOS
run : |
cd ./igSource
rm ./output/listFormat/NOS-Fichiers_Publics-Versions_xml_svs.zip
rm ./output/listFormat/NOS-Fichiers_Publics-Versions_json_fhir.zip
rm ./output/listFormat/Nos-fichiers_publics-versions_xml_fhir.zip
rm ./output/listFormat/NOS-Fichiers_Publics.zip
rm ./output/listFormat/NOS-Jeux_de_Valeurs_CI-SIS.zip
zip -rj ./output/listFormat/NOS-Fichiers_Publics-Versions_xml_svs.zip ./output/listFormat/ValueSet*-svs.xml ./output/listFormat/CodeSystem*-svs.xml -x "*FHIR*"
zip -FSrj ./output/listFormat/NOS-Fichiers_Publics-Versions_json_fhir.zip ./output/ValueSet*.json ./output/CodeSystem*.json
zip -FSrj ./output/listFormat/Nos-fichiers_publics-versions_xml_fhir.zip ./output/ValueSet*.xml ./output/CodeSystem*.xml
zip -FSrj ./output/listFormat/NOS-Fichiers_Publics.zip ./output/listFormat/ValueSet*.tabs ./output/listFormat/CodeSystem*.tabs
zip -FSrj ./output/listFormat/NOS-Jeux_de_Valeurs_CI-SIS.zip ./output/listFormat/*CISIS*.tabs
- name: Get branch names
id: branch-name
uses: tj-actions/[email protected]
# 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,**CodeSystem-TRE-R13-Commune.json.html**, **CodeSystem-TRE-R13-Commune.ttl.html**,**CodeSystem-TRE-R13-Commune.xml.html**'
commit_message: ' ${{ github.event.head_commit.message }}'