diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..50d37fe7 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,35 @@ +name: Build docs + +on: + pull_request: + branches: + - main + +jobs: + build-and-upload: + name: Build & Upload Artifact + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v3 + with: + python-version: "3.10" + + - uses: tlambert03/setup-qt-libs@v1 + + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + python -m pip install ".[docs]" + - name: Build Docs + uses: aganders3/headless-gui@v1 + with: + run: make html + working-directory: ./docs + + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: docs + path: docs/_build diff --git a/docs/conf.py b/docs/conf.py index efff247a..5a317aed 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,7 @@ # import os # import sys # sys.path.insert(0, os.path.abspath('.')) -# import qtgallery +import qtgallery # -- Project information ----------------------------------------------------- @@ -30,27 +30,24 @@ extensions = [ "numpydoc", "sphinx_gallery.gen_gallery", - # "qtgallery", + "qtgallery", "sphinx_automodapi.automodapi", "sphinx_automodapi.smart_resolver", "sphinx.ext.intersphinx", ] sphinx_gallery_conf = { - # Don't run any gallery examples, because they're not working on - # readthedocs at the moment - "filename_pattern": "a^", - # "image_scrapers": (qtgallery.qtscraper,), - # "reset_modules": (qtgallery.reset_qapp,), + "filename_pattern": ".", + "image_scrapers": (qtgallery.qtscraper,), + "reset_modules": (qtgallery.reset_qapp,), } - -# qtgallery_conf = { -# "xvfb_size": (640, 480), -# "xvfb_color_depth": 24, -# "xfvb_use_xauth": False, -# "xfvb_extra_args": [], -# } +"""qtgallery_conf = { + "xvfb_size": (640, 480), + "xvfb_color_depth": 24, + "xfvb_use_xauth": False, + "xfvb_extra_args": [], +}""" numpydoc_show_class_members = False automodapi_inheritance_diagram = False diff --git a/setup.cfg b/setup.cfg index aa4769a3..1e09aca4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,7 @@ docs = napari[all] numpydoc pydata-sphinx-theme + qtgallery sphinx sphinx-automodapi sphinx-gallery
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: