Skip to content

Commit

Permalink
chore(docs): make documentation build workflow more robust
Browse files Browse the repository at this point in the history
The workflow should ignore changes to the .github repository and only
try to push changes if there are some.
  • Loading branch information
b1rger committed Aug 28, 2023
1 parent ba2b489 commit b3710b1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ name: "Build documentation"
on:
push:
branches: main
paths-ignore:
- '.github/**'
workflow_dispatch:

permissions:
Expand Down Expand Up @@ -51,6 +53,8 @@ jobs:
touch .nojekyll
git config user.name github-actions
git config user.email [email protected]
git add .
git commit -m "Updated documentation"
git push --set-upstream origin pages
if ! git diff --exit-code .; then
git add .
git commit -m "Updated documentation"
git push --set-upstream origin pages
fi

0 comments on commit b3710b1

Please sign in to comment.