diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..24a0673b --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: Build Documentation + +on: + push: + branches: + - main + release: + + pull_request: + branches: + - main + + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: build + auto-update-conda: true + + - name: install requirements + run: >- + conda install -n build -c conda-forge + --file requirements/build.txt + --file requirements/run.txt + --file requirements/docs.txt + --quiet --yes + + - name: install the package + run: python -m pip install . --no-deps + + - name: build documents + run: make -C doc/manual html + + - name: Deploy + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/manual/build/html \ No newline at end of file diff --git a/doc/Makefile b/doc/manual/Makefile similarity index 100% rename from doc/Makefile rename to doc/manual/Makefile diff --git a/doc/images/aspirin_smear.png b/doc/manual/images/aspirin_smear.png similarity index 100% rename from doc/images/aspirin_smear.png rename to doc/manual/images/aspirin_smear.png diff --git a/doc/images/aspirin_stretch.png b/doc/manual/images/aspirin_stretch.png similarity index 100% rename from doc/images/aspirin_stretch.png rename to doc/manual/images/aspirin_stretch.png diff --git a/doc/images/morph_ex1.png b/doc/manual/images/morph_ex1.png similarity index 100% rename from doc/images/morph_ex1.png rename to doc/manual/images/morph_ex1.png diff --git a/doc/images/morph_ex2.png b/doc/manual/images/morph_ex2.png similarity index 100% rename from doc/images/morph_ex2.png rename to doc/manual/images/morph_ex2.png diff --git a/doc/images/nacl_example.agr b/doc/manual/images/nacl_example.agr similarity index 100% rename from doc/images/nacl_example.agr rename to doc/manual/images/nacl_example.agr diff --git a/doc/images/nacl_example.xcf b/doc/manual/images/nacl_example.xcf similarity index 100% rename from doc/images/nacl_example.xcf rename to doc/manual/images/nacl_example.xcf diff --git a/doc/images/pdfmorph_example.agr b/doc/manual/images/pdfmorph_example.agr similarity index 100% rename from doc/images/pdfmorph_example.agr rename to doc/manual/images/pdfmorph_example.agr diff --git a/doc/images/pdfmorph_example.png b/doc/manual/images/pdfmorph_example.png similarity index 100% rename from doc/images/pdfmorph_example.png rename to doc/manual/images/pdfmorph_example.png diff --git a/doc/images/pdfmorph_example.xcf b/doc/manual/images/pdfmorph_example.xcf similarity index 100% rename from doc/images/pdfmorph_example.xcf rename to doc/manual/images/pdfmorph_example.xcf diff --git a/doc/images/pdfmorph_smear.png b/doc/manual/images/pdfmorph_smear.png similarity index 100% rename from doc/images/pdfmorph_smear.png rename to doc/manual/images/pdfmorph_smear.png diff --git a/doc/images/pdfmorph_smear2.png b/doc/manual/images/pdfmorph_smear2.png similarity index 100% rename from doc/images/pdfmorph_smear2.png rename to doc/manual/images/pdfmorph_smear2.png diff --git a/doc/images/pdfmorph_stretch.png b/doc/manual/images/pdfmorph_stretch.png similarity index 100% rename from doc/images/pdfmorph_stretch.png rename to doc/manual/images/pdfmorph_stretch.png diff --git a/doc/make.bat b/doc/manual/make.bat similarity index 95% rename from doc/make.bat rename to doc/manual/make.bat index 6247f7e2..9534b018 100644 --- a/doc/make.bat +++ b/doc/manual/make.bat @@ -1,35 +1,35 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -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 +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +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 diff --git a/doc/source/conf.py b/doc/manual/source/conf.py similarity index 98% rename from doc/source/conf.py rename to doc/manual/source/conf.py index 766b082b..235d9f37 100644 --- a/doc/source/conf.py +++ b/doc/manual/source/conf.py @@ -13,7 +13,7 @@ import sys import os sys.path.insert(0, os.path.abspath('../..')) -sys.path.insert(0, os.path.abspath('../../src')) +sys.path.insert(0, os.path.abspath('../../../src')) # -- Project information ----------------------------------------------------- diff --git a/doc/source/index.rst b/doc/manual/source/index.rst similarity index 98% rename from doc/source/index.rst rename to doc/manual/source/index.rst index 51f252e1..4a484320 100644 --- a/doc/source/index.rst +++ b/doc/manual/source/index.rst @@ -63,7 +63,7 @@ To get started, please go to :ref:`quick_start` release package -.. include:: ../../CHANGELOG.rst +.. include:: ../../../CHANGELOG.rst Indices ------- diff --git a/doc/source/license.rst b/doc/manual/source/license.rst similarity index 100% rename from doc/source/license.rst rename to doc/manual/source/license.rst diff --git a/doc/source/mod_log.rst b/doc/manual/source/mod_log.rst similarity index 100% rename from doc/source/mod_log.rst rename to doc/manual/source/mod_log.rst diff --git a/doc/source/mod_pdfplot.rst b/doc/manual/source/mod_pdfplot.rst similarity index 100% rename from doc/source/mod_pdfplot.rst rename to doc/manual/source/mod_pdfplot.rst diff --git a/doc/source/mod_refine.rst b/doc/manual/source/mod_refine.rst similarity index 100% rename from doc/source/mod_refine.rst rename to doc/manual/source/mod_refine.rst diff --git a/doc/source/mod_tools.rst b/doc/manual/source/mod_tools.rst similarity index 100% rename from doc/source/mod_tools.rst rename to doc/manual/source/mod_tools.rst diff --git a/doc/source/morph_helpers.rst b/doc/manual/source/morph_helpers.rst similarity index 100% rename from doc/source/morph_helpers.rst rename to doc/manual/source/morph_helpers.rst diff --git a/doc/source/morphs.rst b/doc/manual/source/morphs.rst similarity index 100% rename from doc/source/morphs.rst rename to doc/manual/source/morphs.rst diff --git a/doc/source/package.rst b/doc/manual/source/package.rst similarity index 100% rename from doc/source/package.rst rename to doc/manual/source/package.rst diff --git a/doc/source/quickstart.rst b/doc/manual/source/quickstart.rst similarity index 100% rename from doc/source/quickstart.rst rename to doc/manual/source/quickstart.rst diff --git a/doc/manual/source/release.rst b/doc/manual/source/release.rst new file mode 100644 index 00000000..c028e34c --- /dev/null +++ b/doc/manual/source/release.rst @@ -0,0 +1,4 @@ +.. index:: release notes + +.. include:: /../../../CHANGELOG.rst + diff --git a/doc/source/release.rst b/doc/source/release.rst deleted file mode 100644 index ca8fa0b6..00000000 --- a/doc/source/release.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. index:: release notes - -.. include:: /../../CHANGELOG.rst -