Skip to content

adding notebook to CI #28

adding notebook to CI

adding notebook to CI #28

Workflow file for this run

name: CI/CD
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build
run: ./gradlew build
- name: Query
run: ./gradlew owlQuery
- name: Upload
if: ${{ always() }}
uses: actions/upload-artifact@v3
with:
name: build
path: build/
- name: Generate Docs
run: ./gradlew generateDocs
- name: Set up Python 3
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install Requirements
run: pip install -r src/ipynb/requirements.txt
- name: Run Notebook
run: python -m nbconvert --execute --to notebook --no-input src/ipynb/index.ipynb --output-dir='build/web'
- name: Convert Notebook to HTML
run: python -m nbconvert --to html --no-input build/web/index.ipynb
- name: Publish
uses: actions/upload-pages-artifact@v1
with:
path: build/web
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy
id: deployment
uses: actions/deploy-pages@v1