Open Borda opened 4 years ago
You can co-opt the pre-build-command
option, which seems to be intended for use with apt-get
, to install packages via pip.
Here's how I use it to install tox
:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: ammaraskar/sphinx-action@master
with:
pre-build-command: python -m pip install tox
So you could install from your requirements/docs.txt
file like this:
pre-build-command: python -m pip install -r requirements/docs.txt
I think pre-build-command
is the best way to deal with this. Auto installing the <docs folder>/requirements.txt
is mostly just a general convenience thing that covers like 75% of sphinx usages. While I could add another configurable field for this, I think these fields would quickly grow depending on all the different ways people want to handle their dependencies.
Are you comfortable with continuing to use pre-build-command
or do you have any other thoughts @Borda?
You can co-opt the
pre-build-command
option, which seems to be intended for use withapt-get
, to install packages via pip.
that is what already did as this was pending for a while and we needed to get it done, but I feel it not the proper way and I feel it is kind of hack...
I think pre-build-command is the best way to deal with this. Auto installing the
/requirements.txt is mostly just a general convenience thing that covers like 75% of sphinx usages.
True, all small-scale project has it this way and most of the larger-scale project has I our way... and as it is not rare you can see as Read-The-Docs has a special entry for the path to requirements files
Are you comfortable with continuing to use pre-build-command or do you have any other thoughts
we did our hack but I would rather see some clear way like RTD format
@ammaraskar any update here or shall we close it as won't fix? 🐰
Hi, may I ask how to define a custom path to extra requirements, e.g in our case it is
requirements/docs.txt
for now, the action is failing for missing dependencies https://github.com/PyTorchLightning/pytorch-lightning/pull/2128/checks?check_run_id=753522640 for example, RTD config has