Publish Website #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: Publish Website | |
| on: | |
| 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: | |
| # Build job | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set the timezone to New Zealand | |
| uses: szenius/set-timezone@v2.0 | |
| with: | |
| timezoneLinux: 'Pacific/Auckland' | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Python and install PyLode | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: Install PyLode | |
| run: pip install pylode | |
| - name: Copy ontology sources and use PyLode to build HTML | |
| run: | | |
| mkdir -p dist/ontologies/versioned/bondgraph-framework/ | |
| cp ./schema/ontology.ttl dist/ontologies/bondgraph-framework.ttl | |
| cp ./schema/2026-01-21/ontology.ttl dist/ontologies/versioned/bondgraph-framework/2026-01-21-ontology.ttl | |
| cp ./schema/2025-08-13/ontology.ttl dist/ontologies/versioned/bondgraph-framework/2025-08-13-ontology.ttl | |
| # | |
| mkdir -p dist/templates/ | |
| cp ./templates/*.ttl dist/templates | |
| # | |
| pylode -o dist/ontologies/bondgraph-framework.html ./schema/ontology.ttl | |
| pylode -o dist/ontologies/versioned/bondgraph-framework/2026-01-21-ontology.html ./schema/2026-01-21/ontology.ttl | |
| pylode -o dist/ontologies/versioned/bondgraph-framework/2025-08-13-ontology.html ./schema/2025-08-13/ontology.ttl | |
| # | |
| # Add our README as the site's index | |
| cp README.md ./dist/index.md | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./dist | |
| # Deployment job | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |