add semantic mapper diagram to github pages #13
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: WIDOCO build and deploy to Pages | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - ontology/ontology.rdf | |
| - semantic-mapper/class-diagram.pdf | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Create output directory | |
| run: | | |
| mkdir -p ./ontology/doc | |
| chmod -R 777 ./ontology/doc | |
| - name: Convert ontology to HTML | |
| uses: soilwise-he/widoco-action@v0.3 | |
| with: | |
| file-input: '/github/workspace/ontology/ontology.rdf' | |
| folder-output: '/github/workspace/ontology/doc' | |
| options: '-excludeProvenance -getOntologyMetadata' | |
| - name: Rename index | |
| run: mv ./ontology/doc/index-en.html ./ontology/doc/index.html | |
| - name: Include class diagram | |
| run: cp ./semantic-mapper/class-diagram.pdf ./ontology/doc/semantic_mapper-class_diagram.pdf | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: './ontology/doc' | |
| 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@v5 |