Skip to content

Commit

Permalink
add doc script to run after build for local testing, include ANNOds i…
Browse files Browse the repository at this point in the history
…n doc, resolve #3
  • Loading branch information
KonradHoeffner committed Apr 9, 2024
1 parent 93c0bca commit cb71407
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: Generate and Publish Ontology Documentation

# dist branch will not fire push trigger, use manual workflow dispatch.
# See https://github.com/orgs/community/discussions/37103.
# An alternative would be to add tokens and add those to the checkout job of the build workflow but that isn't worth the trouble right now.
on:
workflow_dispatch:
branches:
- dist
push:
branches:
- master
- dist

jobs:
doc:
Expand All @@ -13,6 +18,9 @@ jobs:
WIDOCO_DOWNLOAD_URL: https://github.com/dgarijo/Widoco/releases/download/v1.4.20/widoco-1.4.20-jar-with-dependencies_JDK-17.jar
steps:
- uses: actions/checkout@v4
with:
ref: 'dist'

- name: Cache Widoco
uses: actions/cache@v4
with:
Expand All @@ -27,7 +35,7 @@ jobs:
wget $WIDOCO_DOWNLOAD_URL --progress=dot:giga --output-document=jar/widoco.jar
- name: Run Widoco
run: java -jar jar/widoco.jar -ontFile annodc.owl -rewriteAll -uniteSections -getOntologyMetadata -outFolder .
run: java -jar jar/widoco.jar -ontFile anno.ttl -rewriteAll -uniteSections -getOntologyMetadata -outFolder .

- name: Rename index-en.html to index.html
run: mv doc/index-en.html doc/index.html
Expand Down
6 changes: 6 additions & 0 deletions scripts/doc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
# call scripts/combine first
SCRIPTPATH=`dirname "$0"`
BASEPATH="$SCRIPTPATH/.."
BASEPATH=`( cd "$BASEPATH" && pwd )`
widoco -ontFile $BASEPATH/dist/anno.ttl -ontFile $BASEPATH/annods.owl -rewriteAll -uniteSections -getOntologyMetadata -ignoreIndividuals -outFolder /tmp

0 comments on commit cb71407

Please sign in to comment.