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