useblocks / sphinx-simplepdf

A simple PDF builder for Sphinx documentations
https://sphinx-simplepdf.readthedocs.io
MIT License
32 stars 14 forks source link

Unable to customize the build in `.readthedocs.yaml` #57

Open sachin-suresh-rapyuta opened 1 year ago

sachin-suresh-rapyuta commented 1 year ago

I am trying to configure ReadtheDocs to use simplepdf extension as described in your documentation.

As a workaround, I am trying with builds.jobs.post_build option. Even this seems to fail on ReadtheDocs during the build.

.readthedocs.yaml

# Required
version: 2

#submodules:
#  include:
#    - paamr-deployment

# Set the version of Python and other tools you might need
build:
  os: ubuntu-20.04
  tools:
    python: "3.9"
    # You can also specify other tool versions:
    # nodejs: "16"
    # rust: "1.55"
    # golang: "1.17"
  jobs:
    post_build:
      - cd docs && python -m sphinx-build -a -E -b simplepdf docs build/simplepdf/en/

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats: all

# Optionally declare the Python requirements required to build your docs
python:
  install:
    - requirements: docs/requirements.txt

Here is the error trace:

Running Sphinx v5.1.1

/bin/sh: 1: sphinx-build: not found

Can you please help with the right set of configuration options that needs to be written in .readthedocs.yaml file.

sachin-suresh-rapyuta commented 9 months ago

I also tried to use the same format as mentioned in the documentation:

# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

#submodules:
#  include:
#    - paamr-deployment

# Set the version of Python and other tools you might need
build:
  os: ubuntu-20.04
  tools:
    python: "3.9"
    # You can also specify other tool versions:
    # nodejs: "16"
    # rust: "1.55"
    # golang: "1.17"
  commands:
    - sphinx-build -b simplepdf docs docs/build/simplepdf

# Build documentation in the docs/ directory with Sphinx
sphinx:
  configuration: docs/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats: all

# Optionally declare the Python requirements required to build your docs
python:
  install:
    - requirements: docs/requirements.txt

I still get the same error.