From 6336017c154c73aa749e411a64557628596e5626 Mon Sep 17 00:00:00 2001 From: Eliott C Date: Wed, 23 Feb 2022 21:53:51 +0100 Subject: [PATCH] Fix build_documentation CI (#15803) --- .github/workflows/build_dev_documentation.yml | 12 ++++----- .github/workflows/build_documentation.yml | 26 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build_dev_documentation.yml b/.github/workflows/build_dev_documentation.yml index b58d063221..57f7a7575a 100644 --- a/.github/workflows/build_dev_documentation.yml +++ b/.github/workflows/build_dev_documentation.yml @@ -110,14 +110,14 @@ jobs: - name: Make documentation run: | - cd doc-builder - doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build-dev --notebook_dir notebooks/transformers_doc --clean --version pr_$PR_NUMBER --html + cd doc-builder && + doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build-dev --notebook_dir notebooks/transformers_doc --clean --version pr_$PR_NUMBER --html && cd .. - name: Push to repositories run: | - cd doc-build-dev - ls - git add . - git commit -m "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/transformers/commit/${{ github.sha }}" + cd doc-build-dev && + ls && + git add . && + git commit -m "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/transformers/commit/${{ github.sha }}" && git push origin main diff --git a/.github/workflows/build_documentation.yml b/.github/workflows/build_documentation.yml index bb2a657486..97bc477b3b 100644 --- a/.github/workflows/build_documentation.yml +++ b/.github/workflows/build_documentation.yml @@ -86,28 +86,30 @@ jobs: - name: Make documentation run: | - cd doc-builder - doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build --notebook_dir notebooks/transformers_doc --clean --html + cd doc-builder && + doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build --notebook_dir notebooks/transformers_doc --clean --html && cd .. + env: + NODE_OPTIONS: --max-old-space-size=6656 - name: Push to repositories run: | - cd doc-build - if [[ `git status --porcelain` ]]; then - git add . - git commit -m "Updated with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" + cd doc-build && + if [[ `git status --porcelain` ]]; then + git add . && + git commit -m "Updated with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" && git push origin main else echo "No diff in the documentation." - fi - cd .. + fi && + cd .. && - cd notebooks + cd notebooks && if [[ `git status --porcelain` ]]; then - git add transformers_doc - git commit -m "Updated Transformer doc notebooks with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" + git add transformers_doc && + git commit -m "Updated Transformer doc notebooks with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" && git push origin master else echo "No diff in the notebooks." - fi + fi && cd ..