Skip to content

Commit c2ce024

Browse files
committed
Update workflow to copy README to Wiki
1 parent 6599dbb commit c2ce024

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
1-
name: Copy README to Wiki
1+
name: Update Wiki
22

33
on:
44
push:
5-
paths:
6-
- 'README.md'
7-
5+
branches:
6+
- main
7+
88
jobs:
9-
copy-readme-to-wiki:
9+
update-wiki:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- name: Checkout Repository
12+
- name: Checkout the repo
1313
uses: actions/checkout@v3
1414

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
1816
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"
2118
README_FILE="README.md"
2219
WIKI_README_FILE="Home.md"
23-
24-
# Create a temporary directory for the wiki
20+
2521
mkdir wiki
2622
cd wiki
27-
28-
# Clone the wiki
2923
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: |
3535
git add $WIKI_README_FILE
3636
git commit -m "Update Wiki README from main README" || echo "No changes to commit"
3737
git push

0 commit comments

Comments
 (0)