File tree 1 file changed +22
-25
lines changed
1 file changed +22
-25
lines changed Original file line number Diff line number Diff line change 1
- name : Update Wiki
1
+ name : Sync README to Wiki
2
2
3
3
on :
4
4
push :
5
5
branches :
6
6
- main
7
7
8
8
jobs :
9
- update-wiki :
9
+ sync-readme :
10
10
runs-on : ubuntu-latest
11
- steps :
12
- - name : Checkout the repo
13
- uses : actions/checkout@v3
14
-
15
- - name : Set the wiki URL and the wiki README file path
16
- run : |
17
- WIKI_URL="https://github.com/$GITHUB_REPOSITORY.wiki.git"
18
- README_FILE="README.md"
19
- WIKI_README_FILE="Home.md"
20
11
21
- mkdir wiki
22
- cd wiki
23
- git clone $WIKI_URL .
12
+ steps :
13
+ - name : Checkout base code
14
+ uses : actions/checkout@v2
15
+ with :
16
+ path : base-code
24
17
25
- - name : Set up Git user
26
- run : |
27
- git config --global user.email "[email protected] "
28
- git config --global user.name "Julian Prieber"
18
+ - name : Checkout wiki code
19
+ uses : actions/checkout@v2
20
+ with :
21
+ repository : ${{ github.repository }}.wiki
22
+ path : wiki
29
23
30
- - name : Copy README to wiki
31
- run : cp ../$README_FILE $WIKI_README_FILE
24
+ - name : Copy README.md to wiki
25
+ run : |
26
+ cp base-code/README.md wiki/README.md
32
27
33
- - name : Commit and push changes
34
- run : |
35
- git add $WIKI_README_FILE
36
- git commit -m "Update Wiki README from main README" || echo "No changes to commit"
37
- git push
28
+ - name : Push to wiki
29
+ run : |
30
+ cd wiki
31
+ git config --local user.email "[email protected] "
32
+ git config --local user.name "Julian Prieber"
33
+ git add README.md
34
+ git diff-index --quiet HEAD || git commit -m "Sync README.md to wiki" && git push
You can’t perform that action at this time.
0 commit comments