Skip to content

Update workflow to copy README to Wiki #3

Update workflow to copy README to Wiki

Update workflow to copy README to Wiki #3

name: Update Wiki
on:
push:
branches:
- main
jobs:
update-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Set the wiki URL and the wiki README file path
run: |
WIKI_URL="https://github.com/$GITHUB_REPOSITORY.wiki.git"
README_FILE="README.md"
WIKI_README_FILE="Home.md"
mkdir wiki
cd wiki
git clone $WIKI_URL .
- name: Set up Git user
run: |
git config --global user.email "[email protected]"
git config --global user.name "Julian Prieber"
- name: Copy README to wiki
run: cp ../$README_FILE $WIKI_README_FILE
- name: Commit and push changes
run: |
git add $WIKI_README_FILE
git commit -m "Update Wiki README from main README" || echo "No changes to commit"
git push