Skip to content

Commit

Permalink
Gh workflows support --not_python_module flag (#153)
Browse files Browse the repository at this point in the history
* Ghworkflows support `--not_python_module` flag

* Update .github/workflows/build_main_documentation.yml

Co-authored-by: Sylvain Gugger <[email protected]>

* Rname to `additional_args`

Co-authored-by: Sylvain Gugger <[email protected]>
  • Loading branch information
mishig25 and sgugger authored Mar 25, 2022
1 parent fff9359 commit af4cae2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build_main_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
type: string
notebook_folder:
type: string
# supply --not_python_module for HF Course
additional_args:
type: string
secrets:
token:
required: true
Expand Down Expand Up @@ -96,11 +99,11 @@ jobs:
if [ -z "${{ inputs.notebook_folder }}" ]
then
cd doc-builder &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --html &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --html ${{ inputs.additional_args }} &&
cd ..
else
cd doc-builder &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --notebook_dir ../notebook_dir --clean --html &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --notebook_dir ../notebook_dir --clean --html ${{ inputs.additional_args }} &&
cd ..
fi
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ on:
type: string
path_to_doc:
type: string
# supply --not_python_module for HF Course
additional_args:
type: string
default: ''

jobs:
build_pr_documentation:
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:
echo "doc_folder has been set to ${{ env.doc_folder }}"
cd doc-builder &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --version pr_${{ inputs.pr_number }} --html &&
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --version pr_${{ inputs.pr_number }} --html ${{ inputs.additional_args }} &&
cd ..
- name: Push to repositories
Expand Down

0 comments on commit af4cae2

Please sign in to comment.