Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/build_main_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ jobs:
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Updated with commit ${{ inputs.commit_sha }} See: https://github.com/huggingface/${{ inputs.package }}/commit/${{ inputs.commit_sha }}"
git push origin main
git push origin main ||
(echo "Failed on the first try, rebasing and pushing again" && git pull --rebase && git push origin main) ||
(echo "Failed on the second try, rebasing and pushing again" && git pull --rebase && git push origin main)
else
echo "No diff in the documentation."
fi
Expand All @@ -134,7 +136,9 @@ jobs:
if [[ `git status --porcelain` ]]; then
git add ${{ inputs.notebook_folder }}
git commit -m "Updated ${{ inputs.package }} doc notebooks with commit ${{ inputs.commit_sha }} \n\nSee: https://github.com/huggingface/${{ inputs.package }}/commit/${{ inputs.commit_sha }}"
git push origin master
git push origin master ||
(echo "Failed on the first try, rebasing and pushing again" && git pull --rebase && git push origin master) ||
(echo "Failed on the second try, rebasing and pushing again" && git pull --rebase && git push origin master)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

master or main?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename all those masters to main already ;-)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's rename transformers' master branch to main on Monday? 😃

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's goooooooooooooooooooooooooooo!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else
echo "No diff in the notebooks."
fi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/build_pr_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ jobs:
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Updated with commit ${{ inputs.commit_sha }} See: https://github.com/huggingface/${{ inputs.package }}/commit/${{ inputs.commit_sha }}"
git push origin main
git push origin main ||
(echo "Failed on the first try, rebasing and pushing again" && git pull --rebase && git push origin main) ||
(echo "Failed on the second try, rebasing and pushing again" && git pull --rebase && git push origin main)
else
echo "No diff in the documentation."
fi
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/delete_doc_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ jobs:
if [[ `git status --porcelain` ]]; then
git add .
git commit -m "Closed PR ${{ inputs.pr_number }} in ${{ inputs.package }}"
git push origin main
git push origin main ||
(echo "Failed on the first try, rebasing and pushing again" && git pull --rebase && git push origin main) ||
(echo "Failed on the second try, rebasing and pushing again" && git pull --rebase && git push origin main)
else
echo "Branch was already deleted, nothing to do."
fi
Expand Down