diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 1e07eb2..c44e088 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -1,18 +1,26 @@ 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: runs-on: ubuntu-latest env: - WIDOCO_DOWNLOAD_URL: https://github.com/dgarijo/Widoco/releases/download/v1.4.20/widoco-1.4.20-jar-with-dependencies_JDK-17.jar + WIDOCO_DOWNLOAD_URL: https://github.com/dgarijo/Widoco/releases/download/v1.4.23/widoco-1.4.23-jar-with-dependencies_JDK-17.jar steps: - uses: actions/checkout@v4 + with: + ref: 'dist' + - name: Cache Widoco uses: actions/cache@v4 with: @@ -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 doc - name: Rename index-en.html to index.html run: mv doc/index-en.html doc/index.html diff --git a/annodc.owl b/annodc.owl index 51694e1..1eed1a0 100644 --- a/annodc.owl +++ b/annodc.owl @@ -16,7 +16,7 @@ xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> - 2024-02-15 + 2024-04-09 2023-08-24 diff --git a/scripts/doc b/scripts/doc new file mode 100755 index 0000000..e3962d6 --- /dev/null +++ b/scripts/doc @@ -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