Skip to content

Commit

Permalink
Pip install via another sub-action
Browse files Browse the repository at this point in the history
  • Loading branch information
guyer committed May 17, 2023
1 parent f15e3ee commit bd8bfa8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 29 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ RUN pip install packaging
RUN pip install github-action-utils

ADD entrypoint.py /entrypoint.py
ADD entrypoint.sh /entrypoint.sh
ADD ntd2d_action /ntd2d_action

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/entrypoint.py"]
13 changes: 7 additions & 6 deletions entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ def main():
action = os.environ['INPUT_ACTION']
docs = SphinxDocs(docs_dir=os.environ['INPUT_DOCS-FOLDER'])

# # Install any requirements for documentation.
# # Adapted from ammaraskar/sphinx-action
# requirements = os.path.join(docs.docs_dir, "requirements.txt")
# if os.path.exists(requirements):
# subprocess.check_call(["pip", "install", "-r", requirements])

if action == 'update_pages':
repo = Repository(server_url=os.environ['GITHUB_SERVER_URL'],
repository=os.environ['GITHUB_REPOSITORY'],
Expand All @@ -28,6 +22,13 @@ def main():
sha=os.environ['GITHUB_SHA'])
elif action == 'borg_the_docs':
docs.assimilate_theme()
elif action == 'pip_requirements':
# Install any requirements for documentation.
# Adapted from ammaraskar/sphinx-action
requirements = docs.docs_dir / "requirements.txt"
if os.path.exists(requirements):
subprocess.check_call(["pip", "install", "-r", requirements.as_posix()])


if __name__ == "__main__":
main()
21 changes: 0 additions & 21 deletions entrypoint.sh

This file was deleted.

0 comments on commit bd8bfa8

Please sign in to comment.