This repository was archived by the owner on Jun 17, 2026. It is now read-only.
docs(wiki): add SVG placeholder images for documentation (#17) #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Wiki | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'wiki/**' | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| sync-wiki: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout main repository | |
| uses: actions/checkout@v4 | |
| - name: Checkout wiki repository | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: ${{ github.repository }}.wiki | |
| path: wiki-repo | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Configure Git | |
| run: | | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Sync wiki content | |
| run: | | |
| # Remove old content (except .git) | |
| find wiki-repo -mindepth 1 -maxdepth 1 ! -name '.git' -exec rm -rf {} + | |
| # Copy new content from wiki folder | |
| cp -r wiki/* wiki-repo/ | |
| # Flatten Features subfolder for GitHub wiki compatibility | |
| # GitHub wiki doesn't support subdirectories, so we prefix with "Features-" | |
| if [ -d "wiki-repo/Features" ]; then | |
| for file in wiki-repo/Features/*.md; do | |
| if [ -f "$file" ]; then | |
| filename=$(basename "$file") | |
| mv "$file" "wiki-repo/Features-$filename" | |
| fi | |
| done | |
| rm -rf wiki-repo/Features | |
| fi | |
| # Copy images folder if it exists | |
| if [ -d "wiki/images" ]; then | |
| mkdir -p wiki-repo/images | |
| cp -r wiki/images/* wiki-repo/images/ 2>/dev/null || true | |
| fi | |
| - name: Update internal links | |
| run: | | |
| cd wiki-repo | |
| # Update links to Features/ subdirectory to use Features- prefix | |
| find . -name "*.md" -type f -exec sed -i 's|\](Features/|\](Features-|g' {} + | |
| # Remove parent directory references (../) | |
| find . -name "*.md" -type f -exec sed -i 's|\](\.\.\/|\](|g' {} + | |
| # Fix internal links within Features- files | |
| # These files reference each other without the Features- prefix | |
| for file in Features-*.md; do | |
| if [ -f "$file" ]; then | |
| # Add Features- prefix to known feature page links | |
| sed -i 's|\](Agent-Mode)|\](Features-Agent-Mode)|g' "$file" | |
| sed -i 's|\](Agent-Mode\.es)|\](Features-Agent-Mode.es)|g' "$file" | |
| sed -i 's|\](Agent-Actions-Reference)|\](Features-Agent-Actions-Reference)|g' "$file" | |
| sed -i 's|\](Agent-Actions-Reference\.es)|\](Features-Agent-Actions-Reference.es)|g' "$file" | |
| sed -i 's|\](Chat-Interface)|\](Features-Chat-Interface)|g' "$file" | |
| sed -i 's|\](Chat-Interface\.es)|\](Features-Chat-Interface.es)|g' "$file" | |
| sed -i 's|\](Batch-Processing)|\](Features-Batch-Processing)|g' "$file" | |
| sed -i 's|\](Batch-Processing\.es)|\](Features-Batch-Processing.es)|g' "$file" | |
| sed -i 's|\](Concept-Maps)|\](Features-Concept-Maps)|g' "$file" | |
| sed -i 's|\](Concept-Maps\.es)|\](Features-Concept-Maps.es)|g' "$file" | |
| fi | |
| done | |
| - name: Push to wiki | |
| run: | | |
| cd wiki-repo | |
| git add -A | |
| if git diff --staged --quiet; then | |
| echo "No changes to sync" | |
| else | |
| git commit -m "Sync wiki from main repository" | |
| git push | |
| fi |