Skip to content

Commit

Permalink
👷 Move pre-command into separate block
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Apr 29, 2023
1 parent 6abe455 commit d563ede
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build_main_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ jobs:
cd build_dir/${{ env.package_name }}
wget https://huggingface.co/datasets/hf-doc-build/doc-build/raw/main/${{ env.package_name }}/_versions.yml
- name: Run pre-command
shell: bash
run: |
if [ ! -z "${{ inputs.pre_command }}" ]
then
bash -c "${{ inputs.pre_command }}"
fi
- name: Make documentation
shell: bash
env:
Expand All @@ -141,11 +149,6 @@ jobs:
cd doc-builder
args="--build_dir ../build_dir --clean --html ${{ inputs.additional_args }} --repo_owner ${{ inputs.repo_owner }} --repo_name ${{ inputs.package }} --version_tag_suffix=${{ inputs.version_tag_suffix }}"
if [ ! -z "${{ inputs.pre_command }}" ]
then
bash -c "${{ inputs.pre_command }}"
fi
if [ ! -z "${{ inputs.notebook_folder }}" ];
then
args="$args --notebook_dir ../notebook_dir"
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ jobs:
fi
cd ..
- name: Run pre-command
shell: bash
run: |
if [ ! -z "${{ inputs.pre_command }}" ]
then
bash -c "${{ inputs.pre_command }}"
fi
- name: Make documentation
env:
NODE_OPTIONS: --max-old-space-size=6656
Expand All @@ -144,11 +152,6 @@ jobs:
cd doc-builder
args="--build_dir ../build_dir --clean --version pr_${{ inputs.pr_number }} --html ${{ inputs.additional_args }} --repo_owner ${{ inputs.repo_owner }} --repo_name ${{ inputs.package }} --version_tag_suffix=${{ inputs.version_tag_suffix }}"
if [ ! -z "${{ inputs.pre_command }}" ]
then
bash -c "${{ inputs.pre_command }}"
fi
if [ -z "${{ inputs.languages }}" ];
then
echo "languages not provided, defaulting to English"
Expand Down

0 comments on commit d563ede

Please sign in to comment.