diff --git a/README.rst b/README.rst index 8052f29..d4f7019 100644 --- a/README.rst +++ b/README.rst @@ -44,6 +44,7 @@ to be added to the Github repo. with: username: ${{ secrets.atlassianUsername }} apitoken: ${{ secrets.atlassianApitoken }} + requirementsfile: custom_requirements.txt # this is an optional parameter .. _confluencebuilder: https://github.com/sphinx-contrib/confluencebuilder .. _Github secrets: https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets diff --git a/action.yaml b/action.yaml index 778c914..12b6817 100644 --- a/action.yaml +++ b/action.yaml @@ -11,6 +11,9 @@ inputs: docsdir: description: 'directory in the repo where the docs are located' default: '' + requirementsfile: + description: 'file at base of the directory if it not requirements.txt' + default: '' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint b/entrypoint index 44d7681..8cca908 100755 --- a/entrypoint +++ b/entrypoint @@ -1,7 +1,9 @@ #!/bin/sh -l # install requirements.txt if it exists -if [ -f requirements.txt ]; then +if [ "$INPUT_REQUIREMENTSFILE" ]; then + pip install --user -r $INPUT_REQUIREMENTSFILE +elif [ -f requirements.txt ]; then pip install --user -r requirements.txt fi