ci: run ci #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # name: SHACL Documentation Generation | |
| # on: | |
| # push: | |
| # paths: | |
| # - 'src/ontology/**' | |
| # pull_request: | |
| # paths: | |
| # - 'src/ontology/**' | |
| # jobs: | |
| # generate-docs: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout repository | |
| # uses: actions/checkout@v4 | |
| # - name: Set up Python and install dependencies | |
| # run: | | |
| # python -m pip install --upgrade pip | |
| # pip install rdflib | |
| # - name: Enrich ontology with rdflib | |
| # id: enrich | |
| # run: | | |
| # python tools/python/docs/sparql.py | |
| # echo "enriched_file=/tmp/enriched.ttl" >> $GITHUB_ENV | |
| # - name: Set up Java 11 | |
| # uses: actions/setup-java@v4 | |
| # with: | |
| # distribution: 'temurin' | |
| # java-version: '11' | |
| # - name: Install Graphviz | |
| # run: | | |
| # sudo apt-get update | |
| # sudo apt-get install -y graphviz | |
| # - name: Set DOT_PATH environment variable | |
| # run: echo "GRAPHVIZ_DOT=/usr/bin/dot" >> $GITHUB_ENV | |
| # - name: Download SHACL Play CLI | |
| # run: | | |
| # wget https://github.com/sparna-git/shacl-play/releases/download/0.10.2/shacl-play-app-0.10.2-onejar.jar -O shacl-play-cli.jar | |
| # - name: Generate Documentation | |
| # run: | | |
| # java -jar shacl-play-cli.jar \ | |
| # doc \ | |
| # -d \ | |
| # -i ${{ env.enriched_file }} \ | |
| # -l en \ | |
| # -o docs/index.html | |
| # - name: Commit generated docs | |
| # run: | | |
| # git config user.name "github-actions[bot]" | |
| # git config user.email "github-actions[bot]@users.noreply.github.com" | |
| # git add docs/index.html | |
| # git commit -m "Update generated docs" || echo "No changes to commit" | |
| # git push | |
| # - name: Upload generated documentation as an artifact | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: shacl-documentation | |
| # path: docs/index.html | |
| name: Generate Public Ontology Docs | |
| on: | |
| push: | |
| paths: | |
| - 'src/ontology/arema-ontology.ttl' | |
| - '.github/workflows/docs.yml' | |
| jobs: | |
| generate-vocabs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Prepare directories | |
| run: | | |
| mkdir -p skohub/data | |
| cp src/ontology/arema-ontology.ttl skohub/data/ | |
| echo "" > skohub/.env | |
| - name: Run Skohub Vocabs Docker (internal public) | |
| run: | | |
| docker run --rm \ | |
| -v ${{ github.workspace }}/skohub/data:/app/data \ | |
| -v ${{ github.workspace }}/skohub/.env:/app/.env \ | |
| -v ${{ github.workspace }}/skohub/out:/app/public \ | |
| skohub/skohub-vocabs-docker:latest | |
| - name: Copy results to docs/public | |
| run: | | |
| rm -rf docs/public | |
| mkdir -p docs/public | |
| cp -r skohub/out/* docs/public/ | |
| - name: Commit updated docs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add docs/public | |
| git diff --cached --quiet || git commit -m "Update docs/public via skohub-vocabs" | |
| git push | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |