Skip to content

add tutorial to doc #10

add tutorial to doc

add tutorial to doc #10

Workflow file for this run

name: Documentation
on:
push:
branches: [ site ]
pull_request:
branches: [ site ]
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: site
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install pandoc
run: |
sudo apt-get update
sudo apt-get install -y pandoc
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[docs]
pip install sphinx nbsphinx myst-parser furo
- name: Install package in editable mode
run: |
pip install -e .
- name: Copy tutorials to docs (all ipynb files in examples)
run: |
mkdir -p docs/docs/source/tutorials
cp -r examples/*.ipynb docs/docs/source/tutorials
- name: Build documentation
run: |
cd docs/docs
sphinx-build -b html source .
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/site'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/
publish_branch: gh-pages
force_orphan: true
commit_message: "Deploy documentation updates"