Skip to content

Commit

Permalink
logic push
Browse files Browse the repository at this point in the history
  • Loading branch information
gni committed Oct 29, 2024
1 parent d66f4be commit 4e277ef
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,15 @@ jobs:
docsible -r ./ -g -o README.md -com -nob
- name: Check for documentation changes
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
if git diff --exit-code; then
git add .
if git diff --cached --exit-code; then
echo "No changes to commit";
exit 0;
else
git commit -m "Automated documentation update by GitHub Actions"
git push "https://${TOKEN}@github.com/docsible/thermo-core.git" HEAD:main
fi
- name: Add, commit and push documentation
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: |
git add .
git commit -m "Automated documentation update by GitHub Actions"
git push "https://${TOKEN}@github.com/docsible/thermo-core.git" HEAD:main

0 comments on commit 4e277ef

Please sign in to comment.