diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml new file mode 100644 index 0000000..fc2dae1 --- /dev/null +++ b/.github/workflows/documentation.yaml @@ -0,0 +1,32 @@ +name: documentation + +on: [push, pull_request, workflow_dispatch] + +permissions: + contents: write + +jobs: + docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install Pandoc + run: | + sudo apt-get update + sudo apt-get install -y pandoc + - name: Install dependencies + run: | + pip install ".[docs]" + python -m ipykernel install --user --name python3 + - name: Sphinx build + run: | + sphinx-build docs/source docs/build + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/build/ + force_orphan: true \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 65360ac..c1464b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ dependencies = [ "numpy", "pandas", "matplotlib", # Add other dependencies as required + "scipy", ] [project.urls] @@ -36,7 +37,16 @@ Documentation = "https://github.com/teobucci/tefs" Repository = "https://github.com/teobucci/tefs" [project.optional-dependencies] -docs = ["sphinx", "sphinx-rtd-theme", "myst-parser", "nbsphinx"] +docs = [ + "sphinx", + "sphinx-rtd-theme", + "myst-parser", + "nbsphinx", + "ipykernel", + "jupyter", + "jupyterlab", + "nbconvert", +] [tool.bumpver] current_version = "0.1.0"