Fix build_documentation CI (#15803)
This commit is contained in:
12
.github/workflows/build_dev_documentation.yml
vendored
12
.github/workflows/build_dev_documentation.yml
vendored
@@ -110,14 +110,14 @@ jobs:
|
|||||||
|
|
||||||
- name: Make documentation
|
- name: Make documentation
|
||||||
run: |
|
run: |
|
||||||
cd doc-builder
|
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
|
doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build-dev --notebook_dir notebooks/transformers_doc --clean --version pr_$PR_NUMBER --html &&
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Push to repositories
|
- name: Push to repositories
|
||||||
run: |
|
run: |
|
||||||
cd doc-build-dev
|
cd doc-build-dev &&
|
||||||
ls
|
ls &&
|
||||||
git add .
|
git add . &&
|
||||||
git commit -m "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/transformers/commit/${{ github.sha }}"
|
git commit -m "Updated with commit ${{ github.sha }} See: https://github.com/huggingface/transformers/commit/${{ github.sha }}" &&
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|||||||
26
.github/workflows/build_documentation.yml
vendored
26
.github/workflows/build_documentation.yml
vendored
@@ -86,28 +86,30 @@ jobs:
|
|||||||
|
|
||||||
- name: Make documentation
|
- name: Make documentation
|
||||||
run: |
|
run: |
|
||||||
cd doc-builder
|
cd doc-builder &&
|
||||||
doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build --notebook_dir notebooks/transformers_doc --clean --html
|
doc-builder build transformers ../transformers/docs/source --build_dir ../doc-build --notebook_dir notebooks/transformers_doc --clean --html &&
|
||||||
cd ..
|
cd ..
|
||||||
|
env:
|
||||||
|
NODE_OPTIONS: --max-old-space-size=6656
|
||||||
|
|
||||||
- name: Push to repositories
|
- name: Push to repositories
|
||||||
run: |
|
run: |
|
||||||
cd doc-build
|
cd doc-build &&
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain` ]]; then
|
||||||
git add .
|
git add . &&
|
||||||
git commit -m "Updated with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}"
|
git commit -m "Updated with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" &&
|
||||||
git push origin main
|
git push origin main
|
||||||
else
|
else
|
||||||
echo "No diff in the documentation."
|
echo "No diff in the documentation."
|
||||||
fi
|
fi &&
|
||||||
cd ..
|
cd .. &&
|
||||||
|
|
||||||
cd notebooks
|
cd notebooks &&
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ `git status --porcelain` ]]; then
|
||||||
git add transformers_doc
|
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 commit -m "Updated Transformer doc notebooks with commit ${{ github.sha }} \n\nSee: https://github.com/huggingface/transformers/commit/${{ github.sha }}" &&
|
||||||
git push origin master
|
git push origin master
|
||||||
else
|
else
|
||||||
echo "No diff in the notebooks."
|
echo "No diff in the notebooks."
|
||||||
fi
|
fi &&
|
||||||
cd ..
|
cd ..
|
||||||
|
|||||||
Reference in New Issue
Block a user