diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index c094aa0..0d8b95d 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -1,9 +1,10 @@ name: documentation on: - release: + workflow_run: + workflows: [tests] types: - - published + - completed workflow_dispatch: permissions: @@ -11,13 +12,14 @@ permissions: jobs: docs: + if: ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v3 - name: Install dependencies run: | - pip install sphinx sphinx-immaterial + pip install spotiflow[docs] - name: Sphinx build run: | sphinx-build docs/source docs/build diff --git a/docs/source/conf.py b/docs/source/conf.py index 01898ec..47cffd8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,12 +7,12 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information from pathlib import Path import sys -sys.path.insert(0, Path(__file__).parents[2].resolve().as_posix()) +from spotiflow import __version__ as __spotiflow_version__ project = 'Spotiflow' -copyright = '2023, Albert Dominguez Mantes' +copyright = '2024, Albert Dominguez Mantes' author = 'Albert Dominguez Mantes' -release = '0.4.0' +release = __spotiflow_version__ # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration