Skip to content

Commit c2a3961

Browse files
Add Widoco GitHub Action. Resolve #114.
1 parent b46d4a6 commit c2a3961

File tree

4 files changed

+52
-4
lines changed

4 files changed

+52
-4
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout code
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515

1616
- name: Install dependencies
1717
run: |
@@ -21,7 +21,7 @@ jobs:
2121
run: ./build
2222

2323
- name: Deploy
24-
uses: JamesIves/github-pages-deploy-action@4.1.5
24+
uses: JamesIves/github-pages-deploy-action@v4
2525
with:
2626
branch: dist
2727
folder: dist

.github/workflows/doc.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Generate and Publish Ontology Documentation
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
doc:
11+
runs-on: ubuntu-latest
12+
env:
13+
WIDOCO_DOWNLOAD_URL: https://github.com/dgarijo/Widoco/releases/download/v1.4.17/java-17-widoco-1.4.17-jar-with-dependencies.jar
14+
steps:
15+
- uses: actions/checkout@v3
16+
17+
# use preinstalled Java
18+
#- uses: actions/setup-java@v3
19+
# with:
20+
# distribution: 'temurin'
21+
# java-version: '19'
22+
23+
- name: Cache Widoco
24+
uses: actions/cache@v3
25+
with:
26+
path: jar
27+
key: ${{ env.WIDOCO_DOWNLOAD_URL }}
28+
29+
- name: Download Widoco if it doesn't exist
30+
# wget --no-clobber has exit code 1
31+
run: |
32+
mkdir -p jar
33+
if test -f jar/widoco.jar; then echo "Widoco already exists, skipping download."; exit 0; fi
34+
wget $WIDOCO_DOWNLOAD_URL --progress=dot:giga --output-document=jar/widoco.jar
35+
36+
- name: Run Widoco
37+
run: java -jar jar/widoco.jar -ontFile ontology.ttl -rewriteAll -uniteSections -getOntologyMetadata -outFolder doc
38+
39+
- name: Rename index-en.html to index.html
40+
run: mv doc/index-en.html doc/index.html
41+
42+
- name: Deploy Documentation to gh-pages branch
43+
uses: JamesIves/github-pages-deploy-action@v4
44+
with:
45+
branch: gh-pages
46+
folder: doc
47+
single-commit: true

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ This file can then be uploaded to the HITO SPARQL endpoint:
1616
Warning: This will not include updated software products from the database.
1717

1818
## Documentation
19-
[Download WIDOCO](https://github.com/dgarijo/Widoco/releases) and make it available as `widoco`, then run `./doc` under Linux to generate the ontology documentation.
19+
[Download WIDOCO](https://github.com/dgarijo/Widoco/releases) and make it available as `widoco`, then run `./scripts/doc` under Linux to generate the ontology documentation and open `/tmp/doc/index-en.html`.
20+
Automatically built and published to <https://hitontology.github.io/ontology/>.
2021
Adapt the `doc` script accordingly on other operating systems.
2122

2223
## List of files

ontology.ttl

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
dcterms:contributor "<a href=''http://www.imise.uni-leipzig.de/Mitarbeiter/Birgit_Schneider>Birgit Schneider</a>, <a href='https://www.imise.uni-leipzig.de/en'>IMISE Leipzig, Germany</a>",
3939
"<a href='https://www.imise.uni-leipzig.de/en/Mitarbeiter/Maryam_Ghalandari'>Maryam Ghalandari</a>, <a href='https://www.imise.uni-leipzig.de/en'>IMISE Leipzig, Germany</a>",
4040
"<a href='https://github.com/ThomasPause'>Thomas Pause</a>, formerly <a href='https://www.imise.uni-leipzig.de/en'>IMISE Leipzig, Germany</a>";
41-
dcterms:created "2021-07-29"^^xsd:gYear;
41+
dcterms:created "2022-10-20"^^xsd:gYear;
4242
dcterms:publisher <https://www.imise.uni-leipzig.de/>;
4343
vann:preferredNamespaceURI <http://hitontology.eu/ontology/>;
4444
vann:preferredNamespacePrefix "hito";

0 commit comments

Comments
 (0)