diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..0febd684 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,36 @@ +name: "Sphinx: Render docs" + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: actions/setup-python@v6 + with: + python-version: "3.11" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r doc/requirements.txt + pip install -e . + - name: Build HTML + run: | + cd doc + make html + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: html-docs + path: doc/_build/html/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: doc/_build/html diff --git a/doc/create_env.bat b/doc/create_venv.bat similarity index 100% rename from doc/create_env.bat rename to doc/create_venv.bat diff --git a/doc/requirements.txt b/doc/requirements.txt index be7c2b81..e975fbc4 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,5 +1,4 @@ -Sphinx>=4.2.0 -sphinx-rtd-theme>=1.0.0 -sphinxcontrib-bibtex>=2.4.2 -python_docs_theme>=2024.12 -furo>=2024.8.6 \ No newline at end of file +Sphinx~=9.0.4 +sphinx-rtd-theme~=3.1.0 +sphinxcontrib-bibtex~=2.7.0 +furo~=2025.12.19 \ No newline at end of file diff --git a/doc/run_spinx.bat b/doc/run_spinx.bat index 7ec442ef..b47df5d7 100644 --- a/doc/run_spinx.bat +++ b/doc/run_spinx.bat @@ -4,14 +4,11 @@ setlocal rem Jump to the directory where this script is located (doc\) pushd "%~dp0" -set "PY_BOOTSTRAP=python" -where py >NUL 2>NUL if %ERRORLEVEL% EQU 0 set "PY_BOOTSTRAP=py" if not exist .\venv\Scripts\python.exe ( echo Creating virtual environment... - %PY_BOOTSTRAP% -m venv .\venv - + call create_venv.bat call .\venv\Scripts\activate.bat ) else ( echo Using existing virtual environment...