From c2ce024f6f26611df68637c68640eef9768fac3b Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Tue, 24 Sep 2024 14:50:41 +0200 Subject: [PATCH] Update workflow to copy README to Wiki --- .github/workflows/copy-readme-to-wiki.yml | 40 +++++++++++------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/copy-readme-to-wiki.yml b/.github/workflows/copy-readme-to-wiki.yml index 1e66bb2..80ab642 100644 --- a/.github/workflows/copy-readme-to-wiki.yml +++ b/.github/workflows/copy-readme-to-wiki.yml @@ -1,37 +1,37 @@ -name: Copy README to Wiki +name: Update Wiki on: push: - paths: - - 'README.md' - + branches: + - main + jobs: - copy-readme-to-wiki: + update-wiki: runs-on: ubuntu-latest steps: - - name: Checkout Repository + - name: Checkout the repo uses: actions/checkout@v3 - - name: Copy README.md to Wiki - env: - GH_TOKEN: ${{ secrets.GH_TOKEN }} + - name: Set the wiki URL and the wiki README file path run: | - # Set the wiki URL and the wiki README file path - WIKI_URL="https://$GITHUB_ACTOR:$GH_TOKEN@github.com/$GITHUB_REPOSITORY.wiki.git" + WIKI_URL="https://github.com/$GITHUB_REPOSITORY.wiki.git" README_FILE="README.md" WIKI_README_FILE="Home.md" - - # Create a temporary directory for the wiki + mkdir wiki cd wiki - - # Clone the wiki git clone $WIKI_URL . - - # Copy the README.md to the wiki - cp ../$README_FILE $WIKI_README_FILE - - # Commit and push changes + + - name: Set up Git user + run: | + git config --global user.email "julian.prieber@llc.ovh" + 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