File tree 1 file changed +17
-2
lines changed 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 25
25
with :
26
26
repository : ${{ github.repository }}.wiki
27
27
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
28
39
- name : Set up Python
29
40
uses : actions/setup-python@v4
30
41
with :
42
53
git config user.name "${{ github.actor }}"
43
54
git config user.email "${{ github.actor }}@users.noreply.github.com"
44
55
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