Build sphinx doc as part of ci
This commit is contained in:
parent
fd35df07c4
commit
0e9920b190
34
.github/workflows/github-actions.yml
vendored
34
.github/workflows/github-actions.yml
vendored
@ -66,6 +66,22 @@ jobs:
|
||||
- name: Run test suite
|
||||
run: tox -e $(echo py${{ matrix.python-version }}-mg${{ matrix.PYMONGO }} | tr -d . | sed -e 's/pypypy/pypy/') -- -a "--cov=mongoengine"
|
||||
|
||||
build_doc_dryrun:
|
||||
# ensures that readthedocs can be built continuously
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.7
|
||||
- run: |
|
||||
pip install -e .
|
||||
pip install -r docs/requirements.txt
|
||||
- run: |
|
||||
cd docs
|
||||
make html-readthedocs
|
||||
|
||||
irc_notification:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [linting, test]
|
||||
@ -89,14 +105,18 @@ jobs:
|
||||
python-version: 3.7
|
||||
# todo separate build from publish
|
||||
# https://stackoverflow.com/questions/59349905/which-properties-does-github-event-in-a-github-workflow-have
|
||||
- run: |
|
||||
- name: build dummy wheel for test-pypi
|
||||
run: |
|
||||
pip install wheel
|
||||
python setup.py sdist bdist_wheel
|
||||
- uses: pypa/gh-action-pypi-publish@master
|
||||
python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
|
||||
# python setup.py sdist bdist_wheel
|
||||
- name: publish test-pypi
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.test_pypi_password }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
- uses: pypa/gh-action-pypi-publish@master
|
||||
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||
with:
|
||||
password: ${{ secrets.pypi_password }}
|
||||
# - name: publish pypi
|
||||
# uses: pypa/gh-action-pypi-publish@master
|
||||
# if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||
# with:
|
||||
# password: ${{ secrets.pypi_password }}
|
||||
|
@ -35,6 +35,12 @@ html:
|
||||
@echo
|
||||
@echo "Build finished. Check $(BUILDDIR)/html/index.html"
|
||||
|
||||
html-readthedocs:
|
||||
$(SPHINXBUILD) -T -E -b readthedocs $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
|
@ -26,7 +26,7 @@ sys.path.insert(0, os.path.abspath(".."))
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.todo"]
|
||||
extensions = ["sphinx.ext.autodoc", "sphinx.ext.todo", "readthedocs_ext.readthedocs"]
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ["_templates"]
|
||||
|
@ -1,3 +1,3 @@
|
||||
pymongo>=3.11
|
||||
Sphinx==3.2.1
|
||||
Sphinx==3.3.0
|
||||
sphinx-rtd-theme==0.5.0
|
||||
readthedocs-sphinx-ext==2.1.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user