-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaction.yml
183 lines (183 loc) · 6.84 KB
/
action.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: 'sparqlunicorn-ontdoc'
description: 'Generates HTML documentation from RDF files'
branding:
icon: 'file-text'
color: 'blue'
inputs:
inputs:
version:
required: false
type: string
description: "The version of the script to execute as indicated by its branch name"
default: main
rdffilepath:
required: false
description: "The filepath(s) to the RDF files to process"
default: None
type: string
docpath:
required: false
description: "The output path where the documentation is stored"
default: docs
type: string
prefixns:
required: false
description: "The namespace which should be documented"
default: None
type: string
prefixnsshort:
required: false
description: "The prefix describing the namespace to be documented"
default: suni
type: string
indexpages:
required: false
description: "Indicates whether to create index pages for navigation"
default: true
type: boolean
ghpages:
required: false
description: "Indicates whether to create a deployment to a pages branch"
default: true
type: boolean
ghpagesbranch:
required: false
description: "The branch to deploy the documentation to"
default: gh-pages
type: string
ghpagesfolder:
required: false
description: "The folder which is used for the pages deployment"
default: /
type: string
checkout:
required: false
description: "Indicates whether a checkout of the target repository should be performed"
default: true
type: boolean
templatedir:
required: false
description: "The path or URL of the HTML documentation template to use"
default: ontdocscript/resources/html/
type: string
createcollections:
required: false
description: "Indicates whether additional collections should be created for better navigation"
default: false
type: boolean
preferredlang:
required: false
description: "The preferred language to be displayed in the HTML deployment, pending availability"
default: en
type: string
license:
required: false
description: "The license under which the data in the knowledge graph is published"
default: ""
type: string
logourl:
required: false
description: "The URL pointing to a logo which should be used in the HTML template"
default: ""
type: string
metadatatable:
required: false
description: "Indicates whether an additional table for metadata should be created in the HTML view"
default: false
type: boolean
createnonNSPages:
required: false
description: "Create pages for linked instances not in the target namespace"
default: false
type: boolean
createVOWL:
required: false
description: "Creates Visual OWL documentation"
default: false
type: boolean
ogcapifeatures:
required: false
description: "Creates OGC API Features Static API documentation for exposing geodata"
default: true
type: boolean
iiif:
required: false
description: "Creates IIIF manifest files"
default: true
type: boolean
solid:
required: false
description: "Create additional documents for Solid pod deployments"
default: false
type: boolean
ckan:
required: false
description: "Creates CKAN static API documents"
default: true
type: boolean
startconcept:
required: false
description: "The URI of the concept which is recommended for starting to explore the knowledge graph"
default: ""
type: string
offlinecompat:
required: false
description: "Create portable version of HTML documentation"
default: false
type: boolean
exports:
required: false
description: "Define data exports in addition to the HTML deployment"
default: "ttl"
type: string
datasettitle:
required: false
description: "A title for the HTML deployment"
default: ""
type: string
publisher:
required: false
description: "The publisher of the HTML deployment"
default: ""
type: string
publishingorg:
required: false
description: "The publishing organization of the HTML deployment"
default: ""
type: string
runs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
if: ${{ inputs.checkout }}
uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Checkout tools repo
id: checkout_tools
uses: actions/checkout@v3
continue-on-error: true
with:
repository: sparqlunicorn/sparqlunicornGoesGIS-ontdoc
ref: "${{inputs.version}}"
path: ontdocscript
- name: Checkout tools repo fallback
if: steps.checkout_tools.outcome != 'success'
uses: actions/checkout@v3
with:
repository: sparqlunicorn/sparqlunicornGoesGIS-ontdoc
ref: "main"
path: ontdocscript
- name: Generate Ontology Documentation
run: |
sudo pip3 install rdflib shapely pillow
python3 ontdocscript/src/sparqlunicorn_ontdoc/docgeneration.py --input "${{inputs.rdffilepath}}" --output "${{inputs.docpath}}" --prefixns "${{inputs.prefixns}}" --prefixnsshort "${{inputs.prefixnsshort}}" --createIndexPages "${{inputs.indexpages}}" --createCollections "${{inputs.createcollections}}" --labellang "${{inputs.preferredlang}}" --license "${{inputs.license}}" --logourl "${{inputs.logourl}}" --metadatatable "${{inputs.metadatatable}}" --nonnspages "${{inputs.createnonNSPages}}" --createvowl "${{inputs.createVOWL}}" --ogcapifeatures "${{inputs.ogcapifeatures}}" --iiif "${{inputs.iiif}}" --ckan "${{inputs.ckan}}" --solid "${{inputs.solid}}" --startconcept "${{inputs.startconcept}}" --deploypath "https://${{github.repository_owner}}.github.io/${{ github.event.repository.name }}" --templatepath "${{inputs.templatedir}}" --offlinecompat "${{inputs.offlinecompat}}" --exports "${{inputs.exports}}" --datasettitle "${{inputs.datasettitle}}" --publisher "${{inputs.publisher}}" --publishingorg "${{inputs.publishingorg}}"
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
if: ${{ inputs.ghpages }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: ${{inputs.ghpagesbranch}}
FOLDER: ${{inputs.docpath}}/
clean: false
TARGET-FOLDER: ${{inputs.ghpagesfolder}}