Skip to content

create widoco documentation #12

create widoco documentation

create widoco documentation #12

Workflow file for this run

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: create widoco documentation
on:
workflow_run:
workflows: ["build"]
types:
- completed
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Check job
check:
runs-on: ubuntu-latest
outputs:
ontology-exists: ${{ steps.check.outputs.exists }}
ontology-file: ${{ steps.check.outputs.file }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check for ontology file
id: check
run: |
ONTOLOGY_FILE=$(find src/ontology/ -name "*-full.owl" -type f | head -1)
if [ -z "$ONTOLOGY_FILE" ]; then
echo "No *-full.owl file found in src/ontology/ directory."
echo "exists=false" >> $GITHUB_OUTPUT
else
echo "Found ontology file: $ONTOLOGY_FILE"
echo "exists=true" >> $GITHUB_OUTPUT
echo "file=$ONTOLOGY_FILE" >> $GITHUB_OUTPUT
fi
# Build job
build:
runs-on: ubuntu-latest
needs: check
if: needs.check.outputs.ontology-exists == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build HTML for main
run: |
wget -O widoco.jar https://github.com/dgarijo/Widoco/releases/download/v1.4.25/widoco-1.4.25-jar-with-dependencies_JDK-11.jar
mkdir ./_site
java -jar widoco.jar -ontFile ${{ needs.check.outputs.ontology-file }} -outFolder ./_site -uniteSections -includeAnnotationProperties -lang en-de -getOntologyMetadata -noPlaceHolderText -rewriteAll -webVowl
- name: add default entry point
run: |
cp ./_site/index-en.html ./_site/index.html
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4