Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to 'sphinxdoc/sphinx-latexpdf', or offer as an alternative? #40

Open
ferdnyc opened this issue Dec 30, 2021 · 0 comments
Open

Switch to 'sphinxdoc/sphinx-latexpdf', or offer as an alternative? #40

ferdnyc opened this issue Dec 30, 2021 · 0 comments

Comments

@ferdnyc
Copy link

ferdnyc commented Dec 30, 2021

While working on #39, I also noticed that the Sphinx team have a second container image, spinxdoc/sphinx-latexpdf which they maintain in parallel to sphinxdoc/sphinx. The image is, as they caution, huge (2GB!), but the tradeoff is that it contains nearly all of the packages that users who run apt install <incredible amounts of texlive stuff> will be downloading anyway, every time they use the action.

Presumably GitHub caches docker images, whereas the apt install into the container can't be cached, so using the image would seem like a more efficient way of using latexpdf for those who need it. It might be too heavy to use for every sphinx-action run, but perhaps it could be offered as an alternate image?

I was thinking about how that could be done, and I think this would work (in action.yml):

inputs:
  # ...
  latexpdf:
    description:
      Use a container with latexpdf and dependencies pre-installed
    required: false
    default: false
 runs:
  - using: 'docker'
    if: ${{ inputs.latexpdf == false }}
    image: 'Dockerfile'
  - using: 'docker'
    if: ${{ inputs.latexpdf == true }}
    using 'Dockerfile.latexpdf'

If that doesn't fly, or is just too messy, then maybe even publishing a second action based on sphinx_action, but using sphinxdoc/sphinx-latexpdf, would be worth it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant