diff --git a/action.yml b/action.yml index 5fb37ca..8838e55 100644 --- a/action.yml +++ b/action.yml @@ -6,22 +6,22 @@ inputs: description: Subcommand to perform [borg_the_docs, update_pages]. required: true - docs-folder: + docs_folder: description: The folder containing your sphinx docs. required: true default: "docs/" - default-branch: + default_branch: description: The default branch configured in GitHub. required: false default: "main" - pages-branch: + pages_branch: description: The branch linked to your documentation server. required: false default: 'nist-pages' - pages-url: + pages_url: description: URL of web server for served documentation. required: false diff --git a/entrypoint.py b/entrypoint.py index 6ca66a8..4d5a6f0 100755 --- a/entrypoint.py +++ b/entrypoint.py @@ -8,21 +8,15 @@ 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]) + docs = SphinxDocs(docs_dir=os.environ['INPUT_DOCS_FOLDER']) if action == 'update_pages': repo = Repository(server_url=os.environ['GITHUB_SERVER_URL'], repository=os.environ['GITHUB_REPOSITORY'], - branch=os.environ['INPUT_PAGES-BRANCH'], - default_branch=os.environ['INPUT_DEFAULT-BRANCH'], + branch=os.environ['INPUT_PAGES_BRANCH'], + default_branch=os.environ['INPUT_DEFAULT_BRANCH'], docs=docs, - pages_url=os.environ['INPUT_PAGES-URL']) + pages_url=os.environ['INPUT_PAGES_URL']) repo.update_pages(branch=os.environ['SANITIZED_REF_NAME'], sha=os.environ['GITHUB_SHA']) diff --git a/entrypoint.sh b/entrypoint.sh index a26ee5c..be283ba 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,12 +3,12 @@ echo "::error::`env`" echo "::warning::INPUT_ACTION=${INPUT_ACTION}" echo "::warning::GITHUB_SHA=${GITHUB_SHA}" -echo "::warning::INPUT_DOCS-FOLDER=${INPUT_DOCS-FOLDER}" -echo "::warning::INPUT_DEFAULT-BRANCH=${INPUT_DEFAULT-BRANCH}" -echo "::warning::INPUT_PAGES-BRANCH=${INPUT_PAGES-BRANCH}" -echo "::warning::INPUT_PAGES-URL=${INPUT_PAGES-URL}" +echo "::warning::INPUT_DOCS_FOLDER=${INPUT_DOCS_FOLDER}" +echo "::warning::INPUT_DEFAULT_BRANCH=${INPUT_DEFAULT_BRANCH}" +echo "::warning::INPUT_PAGES_BRANCH=${INPUT_PAGES_BRANCH}" +echo "::warning::INPUT_PAGES_URL=${INPUT_PAGES_URL}" -requirements="${INPUT_DOCS-FOLDER}/requirements.txt" +requirements="${INPUT_DOCS_FOLDER}/requirements.txt" echo "::error::requirements=${requirements}" if [ -f $requirements ];