Skip to content

Commit af4cae2

Browse files
mishig25sgugger
andauthored
Gh workflows support --not_python_module flag (#153)
* 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]>
1 parent fff9359 commit af4cae2

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/build_main_documentation.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
type: string
1414
notebook_folder:
1515
type: string
16+
# supply --not_python_module for HF Course
17+
additional_args:
18+
type: string
1619
secrets:
1720
token:
1821
required: true
@@ -96,11 +99,11 @@ jobs:
9699
if [ -z "${{ inputs.notebook_folder }}" ]
97100
then
98101
cd doc-builder &&
99-
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --html &&
102+
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --html ${{ inputs.additional_args }} &&
100103
cd ..
101104
else
102105
cd doc-builder &&
103-
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --notebook_dir ../notebook_dir --clean --html &&
106+
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --notebook_dir ../notebook_dir --clean --html ${{ inputs.additional_args }} &&
104107
cd ..
105108
fi
106109

.github/workflows/build_pr_documentation.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ on:
1414
type: string
1515
path_to_doc:
1616
type: string
17+
# supply --not_python_module for HF Course
18+
additional_args:
19+
type: string
20+
default: ''
1721

1822
jobs:
1923
build_pr_documentation:
@@ -75,7 +79,7 @@ jobs:
7579
echo "doc_folder has been set to ${{ env.doc_folder }}"
7680
7781
cd doc-builder &&
78-
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --version pr_${{ inputs.pr_number }} --html &&
82+
doc-builder build ${{ inputs.package }} ../${{ env.doc_folder }} --build_dir ../build_dir --clean --version pr_${{ inputs.pr_number }} --html ${{ inputs.additional_args }} &&
7983
cd ..
8084
8185
- name: Push to repositories

0 commit comments

Comments
 (0)