-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: avoid errors when no new autodoc is available
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,17 @@ jobs: | |
git commit -m "docs: update autodoc markdowns" | ||
git push origin update-autodoc | ||
if git diff-index HEAD; then | ||
echo "No changes detected. Skipping commit and PR creation." | ||
echo "no_changes=true" >> $GITHUB_ENV | ||
else | ||
git commit -m "docs: update autodoc markdowns" | ||
git push origin update-autodoc | ||
fi | ||
- name: Create pull request | ||
if: env.no_changes != 'true' | ||
uses: thomaseizinger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|