File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,13 +232,18 @@ jobs:
232232 - run : |
233233 mkdir -p ./docs/${{ env.friendly-version }}
234234 mv ./docs/temp/** ./docs/${{ env.friendly-version }}
235- - run : git fetch origin
236- - run : git checkout -b docs origin/docs --force
237- - run : git config --global user.email "action@github.com"
238- - run : git config --global user.name "GitHub Action"
235+ - run : |
236+ git fetch origin
237+ git checkout -b docs origin/docs --force
238+ git config --global user.email "action@github.com"
239+ git config --global user.name "GitHub Action"
239240 - run : git add -- ./docs/${{ env.friendly-version }}
240- - run : git commit -m'added ./docs/${{ env.friendly-version }}' -- ./docs/${{ env.friendly-version }}
241- - run : git push
241+ - id : check-diff
242+ run : git diff-index --quiet --cached HEAD --
243+ - if : steps.check-diff.outcome == '1'
244+ run : |
245+ git commit -m'added ./docs/${{ env.friendly-version }}' -- ./docs/${{ env.friendly-version }}
246+ git push
242247 # - name: Upload artifact
243248 # uses: actions/upload-pages-artifact@v3
244249 # with:
You can’t perform that action at this time.
0 commit comments