From a924a4081f6a8b1182099f58f5c47c40d75e5236 Mon Sep 17 00:00:00 2001 From: Toni Hermoso Pulido Date: Mon, 28 Mar 2022 12:18:07 +0200 Subject: [PATCH] Added target_path new parameter (#6) * new param * change from dir to path * change from dir to path --- README.rst | 3 +++ action.yml | 4 ++++ main.sh | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 03de2e0..332eed3 100644 --- a/README.rst +++ b/README.rst @@ -58,6 +58,9 @@ Input Default Required Description source files ``target_branch`` ``'gh-pages'`` ``false`` Git branch where assets will be deployed +``target_path`` ``'.'`` ``false`` Directory in Github Pages + where Sphinx Pages will be + placed ``repository_path`` ``'.'`` ``false`` Relative path under ``$GITHUB_WORKSPACE`` to place the repository. diff --git a/action.yml b/action.yml index 30ac4ad..3300c99 100644 --- a/action.yml +++ b/action.yml @@ -14,6 +14,10 @@ inputs: description: 'Git branch where Github Pages will be deployed' required: false default: 'gh-pages' + target_path: + description: 'Path in Github Pages where Sphinx Pages will be placed' + required: false + default: '.' repository_path: description: 'Relative path under $GITHUB_WORKSPACE to place the repository' required: false diff --git a/main.sh b/main.sh index da60a37..ad1d578 100755 --- a/main.sh +++ b/main.sh @@ -79,9 +79,9 @@ rm -vrf * echo Copying HTML documentation to repository # Remove unused doctree rm -rf $tmp_dir/.doctrees -cp -vr $tmp_dir/. . +cp -vr $tmp_dir/. $INPUT_TARGET_PATH echo Adding HTML documentation to repository index -git add . +git add $INPUT_TARGET_PATH echo Recording changes to repository git commit --allow-empty -m "Add changes for $GITHUB_SHA" echo ::endgroup::