Open epogrebnyak opened 4 years ago
Hi @epogrebnyak , the reason why this action may or may not need the requirements.txt file is because for custom mkdocs it may sometimes need a requirements.txt.
Eg. when including mermaid markdown
# Contents of requirements.txt
mkdocs-material
mkdocs-mermaid2-plugin
However, you do have an excellent point that some mkdoc repository especially for the basic one will not need a requirements.txt file. In terms of how to make it better for this repository, I am not quite sure, but in my humble opinion, I think changing the code to
if [ -f "${GITHUB_WORKSPACE}/${REQUIREMENTS}" ]; then
pip install -r "${GITHUB_WORKSPACE}/${REQUIREMENTS}"
fi
I am not that familiar with shell scripting, so pardon me if there is a mistake here, but my idea is that to install requirements.txt
the environment variable REQUIREMENTS
has to be present and points to a valid requirements.txt file. What do you think @mhausenblas ?
Sounds good, wanna PR it?
sure
This should be part of the README.md
I have requirements.txt for my python package, but not related to documentation, the docs just depend on mkdocs and that is it. Why does Actions need to rely on requirements.txt to build docs? (I currently have a fault in numpy installation that blocks building the docs). When I rename requirements the Action passes fine.
https://github.com/mhausenblas/mkdocs-deploy-gh-pages/blob/3aac6d643ddf02203957d5a25c6b54c710e4f72e/action.sh#L9-L16