Unverified Commit 6336017c authored by Eliott C's avatar Eliott C Committed by GitHub
Browse files

Fix build_documentation CI (#15803)

parent a0e34806
...@@ -110,14 +110,14 @@ jobs: ...@@ -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
...@@ -86,28 +86,30 @@ jobs: ...@@ -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 ..
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment