Skip to content

Commit

Permalink
include markdown files
Browse files Browse the repository at this point in the history
  • Loading branch information
JHogenboom committed Jul 5, 2024
1 parent 6d5e390 commit 5f389ed
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/update_wiki.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,17 @@ jobs:
# Clone wiki repo using authenticated URL with environment variable
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git wiki
# Clear existing files in wiki except .git and Home.md
# Copy only updated or new Markdown files to the wiki
# This example uses rsync to update or add files, preserving others
rsync -av --ignore-existing ../converted_md/ wiki/
cd wiki
find . -maxdepth 1 ! -name 'Home.md' ! -name '.git' ! -name '.' ! -name '..' -exec rm -rf {} \;
# Copy converted Markdown files to wiki
cp -r ../converted_md/* .
# Check for changes; if none, exit
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the wiki."
exit 0
fi
# Add, commit, and push changes
git add .
Expand Down

0 comments on commit 5f389ed

Please sign in to comment.