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