diff --git a/.github/workflows/sphinx-build.yaml b/.github/workflows/sphinx-build.yaml new file mode 100644 index 00000000..3c1a1f11 --- /dev/null +++ b/.github/workflows/sphinx-build.yaml @@ -0,0 +1,29 @@ +name: Docs +on: + # Manual run + workflow_dispatch: +permissions: + contents: write +jobs: + docs: + runs-on: windows-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 + - name: Install dependencies + run: | + pip install sphinx sphinx_rtd_theme + pip install --exists-action=w --no-cache-dir -r docs/requirements.txt + pip install --exists-action=w --no-cache-dir -r docs/rtd-requirements.txt + - name: Sphinx build + run: | + sphinx-build docs/source _build + dir + - name: Deploy + 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: _build/ + force_orphan: true \ No newline at end of file diff --git a/.gitignore b/.gitignore index dc5f3843..bec4f9a4 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ *.res *.rc \__pycache__ -\__history \ No newline at end of file +\__history +_build/ \ No newline at end of file diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..3fb1324f --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +# .readthedocs.yml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/source/conf.py + +# Optionally build your docs in additional formats such as PDF and ePub +formats: all diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index c81047f4..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build - -# Path base is the source directory -SOURCEDIR = . -BUILDDIR = ../build - -# Put it first so that "make" without argument is like "make help". -help: - @(cd source; $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)) - -.PHONY: help Makefile i18n - -# All the code is executed as if everything was launched in one shell. -.ONESHELL: -# Like make clean but also remove files generated by autosummary and -# rendered videos. -cleanall: clean - @rm source/reference/* - @rm -rf source/media - @rm -f rendering_times.csv -i18n: - @(cd source; $(SPHINXBUILD) -M gettext "$(SOURCEDIR)" ../i18n/ -t skip-manim $(SPHINXOPTS) $(O);cd ../i18n;bash stripUntranslatable.sh) - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @(cd source; $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 9a8d336a..00000000 --- a/docs/make.bat +++ /dev/null @@ -1,37 +0,0 @@ -@ECHO OFF - -pushd %~dp0\source - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) - -REM The paths are taken from the source directory -set SOURCEDIR=. -set BUILDDIR=..\build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd