🔄 Mode Opératoire: Obsidian Auto-Sync System

📋 Overview

Purpose: Automatically sync Obsidian documentation edits to GitHub and deploy to live website.

Flow:

Edit in Obsidian → Auto-detect (5s) → Git Commit → Push to GitHub → Jekyll Build → Live Website

Total Time: ~2-3 minutes from edit to live deployment


🎯 Current Implementation: Option 1 (File Watcher + Git)

System Architecture

┌─────────────────┐
│  Obsidian Edit  │
└────────┬────────┘
         │
         ▼
┌─────────────────────────┐
│  inotify File Watcher   │
│  (systemd service)      │
└────────┬────────────────┘
         │ (5 second debounce)
         ▼
┌─────────────────────────┐
│  auto-sync-to-github.sh │
│  - Detect changes       │
│  - Git add              │
│  - Git commit           │
│  - Git push             │
└────────┬────────────────┘
         │
         ▼
┌─────────────────────────┐
│  GitHub Repository      │
│  OLYAHYAI/Portfolio     │
└────────┬────────────────┘
         │
         ▼
┌─────────────────────────┐
│  GitHub Actions         │
│  (.github/workflows/)   │
└────────┬────────────────┘
         │
         ▼
┌─────────────────────────┐
│  Jekyll Build           │
│  (Auto-triggered)       │
└────────┬────────────────┘
         │
         ▼
┌─────────────────────────┐
│  GitHub Pages Deploy    │
│  https://olyahyai.      │
│  github.io/Portfolio/   │
└─────────────────────────┘

🚀 Installation Procedure

Prerequisites

Step 1: Git Authentication (ONE TIME)

Choose ONE method:

gh auth login

Option B: SSH Key (Most Secure)

ssh-keygen -t ed25519 -C "your@email.com"
cat ~/.ssh/id_ed25519.pub
# Add to: https://github.com/settings/keys
cd /home/f4blox/Desktop/Gemini/opencode/openproject/OpenProject
git remote set-url origin git@github.com:OLYAHYAI/Portfolio.git

Option C: Credential Helper

git config --global credential.helper store
cd /home/f4blox/Desktop/Gemini/opencode/openproject/OpenProject
git push -u origin main

Step 2: Install Auto-Sync

cd /home/f4blox/Desktop/Gemini/opencode/scripts
./setup-auto-sync.sh
sudo systemctl enable obsidian-github-sync
sudo systemctl start obsidian-github-sync

Step 3: Enable GitHub Pages

  1. Visit: https://github.com/OLYAHYAI/Portfolio/settings/pages
  2. Source: main / (root)
  3. Save

🔧 Daily Operations

Normal Usage: 1. Edit in Obsidian 2. Save (Ctrl+S) 3. Auto-syncs in 5 seconds 4. Live in ~2 minutes

Manual Sync:

/home/f4blox/Desktop/Gemini/opencode/scripts/sync-now.sh

Monitor:

sudo systemctl status obsidian-github-sync
sudo journalctl -u obsidian-github-sync -f

🔮 Future Options (Documented)

Option 2: MCP + n8n (AI Workflows)

  • AI-powered commit messages
  • Content validation
  • Multi-service integration
  • Setup: 30-60 min

Option 6: Claude + Content Enhancement

  • AI quality control
  • Auto-fix grammar/spelling
  • Intelligent commits
  • Privacy checking
  • SEO optimization
  • Auto-translate EN ↔︎ FR
  • Setup: 1-2 hours

Documentation: /opencode/conscience/updates/action-35-sync-options-analysis.md


📚 Resources

  • Scripts: /opencode/scripts/
  • Conscience: /opencode/conscience/
  • Website: https://olyahyai.github.io/Portfolio/
  • Repository: https://github.com/OLYAHYAI/Portfolio

Last Updated: 2025-10-29 Version: 1.0 Status: Ready for deployment