File tree 1 file changed +4
-7
lines changed 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
1
2
name : Sync Wiki
2
3
3
- on :
4
+ true :
4
5
push :
5
6
branches :
6
7
- main
@@ -19,31 +20,27 @@ jobs:
19
20
uses : actions/checkout@v3
20
21
with :
21
22
path : repo
22
-
23
23
- name : Checkout Wiki
24
24
uses : actions/checkout@v3
25
25
with :
26
26
repository : ${{ github.repository }}.wiki
27
27
path : wiki
28
-
29
28
- name : Set up Python
30
29
uses : actions/setup-python@v4
31
30
with :
32
31
python-version : ' 3.10'
33
-
34
32
- name : Install dependencies
35
33
run : pip install pyyaml
36
-
37
34
- name : Sync markdown files to Wiki
38
35
run : |
39
36
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
40
37
env :
41
38
GITHUB_REPOSITORY : ${{ github.repository }}
42
-
43
39
- name : Push changes to wiki
44
40
run : |
45
41
cd wiki
46
42
git config user.name "${{ github.actor }}"
47
43
git config user.email "${{ github.actor }}@users.noreply.github.com"
48
44
git add .
49
- git diff --quiet && git diff --staged --quiet || (git commit -m "Auto sync wiki from main repository" && git push)
45
+ git diff --quiet && git diff --staged --quiet || \
46
+ (git commit -m "Auto sync wiki from main repository" && git push)
You can’t perform that action at this time.
0 commit comments