File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed
Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 2525 with :
2626 repository : ${{ github.repository }}.wiki
2727 path : wiki
28+ continue-on-error : true
29+ - name : Create Wiki Directory if Not Exists
30+ run : |
31+ if [ ! -d "wiki" ]; then
32+ mkdir -p wiki
33+ cd wiki
34+ git init
35+ git config user.name "${{ github.actor }}"
36+ git config user.email "${{ github.actor }}@users.noreply.github.com"
37+ git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
38+ fi
2839 - name : Set up Python
2940 uses : actions/setup-python@v4
3041 with :
4253 git config user.name "${{ github.actor }}"
4354 git config user.email "${{ github.actor }}@users.noreply.github.com"
4455 git add .
45- git diff --quiet && git diff --staged --quiet || \
46- (git commit -m "Auto sync wiki from main repository" && git push)
56+ if git status --porcelain | grep .; then
57+ git commit -m "Auto sync wiki from main repository"
58+ git push --set-upstream https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.wiki.git master -f
59+ else
60+ echo "No changes to commit"
61+ fi
You can’t perform that action at this time.
0 commit comments