Skip to content

Update README.md

Update README.md #6

name: Jobs executed on push to 'main' branch
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test-workflow:
uses: ./.github/workflows/sub.test.yml
doc:
name: Build documentation
needs:
- test-workflow
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install sphinx sphinx-rtd-theme myst-parser
- name: Build Sphinx documentation
run: |
sphinx-apidoc -T -f -o ./python/docs/source/apidoc ./python/src
sphinx-build -b html ./python/docs/source ./python/docs/build/html
- name: Upload documentation artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./python/docs/build/html
doc-deploy:
name: Deploy documentation
needs:
- doc
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy documentation to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4