Skip to content

Commit

Permalink
Merge pull request #25 from sphinx-notes/feat/sphinx-build-options-fo…
Browse files Browse the repository at this point in the history
…r-v3

Add sphinx_build_options
  • Loading branch information
SilverRainZ authored Mar 25, 2023
2 parents 26eedf7 + 986b895 commit 8cdb209
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
26 changes: 13 additions & 13 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ __ https://docs.github.com/en/pages/getting-started-with-github-pages/configurin
Inputs
======

======================= ============================ ======== ======================================
Input Default Required Description
----------------------- ---------------------------- -------- --------------------------------------
``documentation_path`` ``./docs`` false Path to Sphinx source files
``requirements_path`` ``./docs/requirements.txt`` false Path to to requirements file,
used in ``pip install -r XXX`` command
``pyproject_extras`` ``docs`` false Extras of `Requirement Specifier`__
used in ``pip install .[XXX]``
``python_version`` ``3.10`` false Version of Python
``sphinx_version`` ``5.3`` false Version of Sphinx
``cache`` ``false`` false Enable cache to speed up documentation
building
======================= ============================ ======== ======================================
========================== ============================ ======== ==============================================
Input Default Required Description
-------------------------- ---------------------------- -------- ----------------------------------------------
``documentation_path`` ``./docs`` false Path to Sphinx source files
``requirements_path`` ``./docs/requirements.txt`` false Path to to requirements file,
used in ``pip install -r XXX`` command
``pyproject_extras`` ``docs`` false Extras of `Requirement Specifier`__
used in ``pip install .[XXX]``
``python_version`` ``3.10`` false Version of Python
``sphinx_version`` ``5.3`` false Version of Sphinx
``sphinx_build_options`` ```` false Additional options passed to ``sphinx-build``
``cache`` ``false`` false Enable cache to speed up documentation building
========================== ============================ ======== ===============================================

__ https://pip.pypa.io/en/stable/reference/requirement-specifiers/#overview

Expand Down
1 change: 1 addition & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ runs:
INPUT_PYPROJECT_EXTRAS: ${{ inputs.pyproject_extras }}
INPUT_SPHINX_VERSION: ${{ inputs.sphinx_version }}
INPUT_CACHE: ${{ inputs.cache }}
INPUT_SPHINX_BUILD_OPTIONS: ${{ inputs.sphinx_build_options }}

- name: Setup Pages
uses: actions/configure-pages@v2
Expand Down
2 changes: 1 addition & 1 deletion main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ mkdir -p $build_dir || true
echo Temp directory \"$build_dir\" is created

echo ::group:: Running Sphinx builder
if ! sphinx-build -b html "$doc_dir" "$build_dir"; then
if ! sphinx-build -b html $INPUT_SPHINX_BUILD_OPTIONS "$doc_dir" "$build_dir"; then
echo ::endgroup::
echo ::group:: Dumping Sphinx error log
for l in $(ls /tmp/sphinx-err*); do
Expand Down

0 comments on commit 8cdb209

Please sign in to comment.