Add wiki documentation and sync workflow

This commit is contained in:
2025-04-17 03:56:11 +01:00
parent d78b2c3d52
commit 0c194d9e23
11 changed files with 933 additions and 0 deletions

52
.github/workflows/sync-wiki.yml vendored Normal file
View File

@ -0,0 +1,52 @@
name: Sync Wiki
on:
push:
branches:
- main
paths:
- '.wiki/**'
jobs:
sync-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "action@github.com"
- name: Clone Wiki
run: |
git clone "https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git" wiki
- name: Sync Wiki Content
run: |
# Remove all files from wiki repository (except .git directory)
find wiki -mindepth 1 -maxdepth 1 -not -name ".git" -exec rm -rf {} \;
# Copy all files from .wiki directory to wiki repository
cp -r .wiki/* wiki/
# Go to wiki repository
cd wiki
# Add all files
git add .
# Check if there are changes
if git diff --staged --quiet; then
echo "No changes to commit"
exit 0
fi
# Commit changes
git commit -m "Sync wiki from .wiki directory"
# Push changes
git push