Merge pull request #675 from collective/pull-request-preview

Add pull request preview on Read the Docs
pull/679/head
Nicco Kunzmann 2024-07-02 20:34:15 +01:00 zatwierdzone przez GitHub
commit 560c006a0e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
3 zmienionych plików z 19 dodań i 7 usunięć

Wyświetl plik

@ -16,9 +16,17 @@ build:
os: ubuntu-22.04
tools:
python: "3.11"
python:
install:
- requirements: requirements_docs.txt
- method: pip
path: .
commands:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- docs/ src/icalender/*.py CHANGES.rst CONTRIBUTING.rst LICENSE.rst README.rst .readthedocs.yaml requirements_docs.txt;
then
exit 183;
fi
- pip install -r requirements_docs.txt
- cd docs && make rtd-pr-preview

Wyświetl plik

@ -65,6 +65,7 @@ New features:
- Test compatibility with Python 3.12
- Add function ``icalendar.use_pytz()``.
- Add `sphinx-autobuild` for `livehtml` Makefile target.
- Add pull request preview on Read the Docs.
Bug fixes:

Wyświetl plik

@ -16,7 +16,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext livehtml rtd-pr-preview
help:
@echo "Please use \`make <target>' where <target> is one of"
@ -166,3 +166,6 @@ livehtml:
--ignore "*.swp" \
--port 8050 \
-b html . "$(BUILDDIR)/html" $(SPHINXOPTS) $(O)
rtd-pr-preview: ## Build pull request preview on Read the Docs
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) ${READTHEDOCS_OUTPUT}/html/