Skip to content

Commit 32db8c6

Browse files
committed
Update workflow to copy README to Wiki
1 parent f786f51 commit 32db8c6

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

0 commit comments

Comments
 (0)