ThriveSend Documentation Auto-Sync System
ThriveSend Documentation Auto-Sync System
Section titled “ThriveSend Documentation Auto-Sync System”Last Updated: January 26, 2026
Overview
Section titled “Overview”Automated system that syncs ThriveSend B2B2G documentation changes to DocsHub whenever you commit.
What it does:
- ✅ Automatically detects documentation changes in
docs-new/ - ✅ Syncs files to DocsHub repository
- ✅ Rebuilds MkDocs site
- ✅ Commits and pushes changes to GitHub
- ✅ Updates live documentation at docs.isutech.co.za
How It Works
Section titled “How It Works”Automatic Sync (Preferred)
Section titled “Automatic Sync (Preferred)”The system runs automatically after every commit!
- Make changes to documentation in
docs-new/ - Add and commit your changes:
Terminal window git add docs-new/git commit -m "Add new screenshot" - That’s it! The hook automatically:
- Detects documentation changes
- Syncs to DocsHub
- Rebuilds the site
- Pushes to GitHub
Example:
# Add a new screenshotcp ~/Desktop/screenshot.png docs-new/assets/images/screenshots/02-sign-up-form.png
# Commit itgit add docs-new/assets/images/screenshots/02-sign-up-form.pnggit commit -m "Add sign-up form screenshot"
# 🔄 Auto-sync runs automatically!# You'll see output like:# 🔄 Documentation changes detected! Starting auto-sync...# 📋 Commit: abc123 - Add sign-up form screenshot# [Sync process runs...]# ✨ Sync completed successfully!Manual Sync (When Needed)
Section titled “Manual Sync (When Needed)”If you need to sync without committing, use the manual command:
# Run manual sync/root/scripts/sync-thrivesend-docs.sh
# Or use the aliassync-docsWhen to use manual sync:
- Testing changes before committing
- Fixing sync issues
- Syncing after amending commits
Files and Locations
Section titled “Files and Locations”Sync Script
Section titled “Sync Script”/root/scripts/sync-thrivesend-docs.sh- Main sync logic
- Can be run manually
- Used by git hook
Git Hook
Section titled “Git Hook”/root/projects/active/thrive-send-b2b2g/.git/hooks/post-commit- Runs after every commit
- Checks if docs changed
- Calls sync script
sync-docs # Convenient shortcut to run sync manually- Added to
/root/.bashrc - Available in any terminal
Sync Process Steps
Section titled “Sync Process Steps”- Verify Directories - Check source and target exist
- Sync Files - Use rsync to copy changed files
- Build Site - Run MkDocs build
- Check Changes - Git status in DocsHub repo
- Commit - Create commit with reference to original
- Push - Push to GitHub
- Summary - Display success message and URL
What Gets Synced
Section titled “What Gets Synced”Source:
/root/projects/active/thrive-send-b2b2g/docs-new/Target:
/var/www/docs/repo/docs/products/thrivesend-technical/All files and directories:
api/- API documentationarchitecture/- Architecture docsassets/- Images, diagrams, screenshotscompliance/- Compliance documentationdeployment/- Deployment guidesdeveloper-guide/- Developer documentationgetting-started/- Getting started guidestechnical-design/- Technical design docsuser-guide/- User guide documentationindex.md- Documentation homepage
Adding Screenshots
Section titled “Adding Screenshots”Recommended Workflow
Section titled “Recommended Workflow”-
Take screenshot on your Mac:
⌘ Cmd + Shift + 4 (select area)⌘ Cmd + Shift + 3 (full screen)⌘ Cmd + Shift + 5 (screenshot toolbar) -
Save with correct filename:
- Check the markdown file for the expected filename
- Example:
01-landing-page.png
-
Copy to ThriveSend repo:
Terminal window cp ~/Desktop/screenshot.png \/root/projects/active/thrive-send-b2b2g/docs-new/assets/images/screenshots/01-landing-page.png -
Commit:
Terminal window git add docs-new/assets/images/screenshots/01-landing-page.pnggit commit -m "Add landing page screenshot" -
Auto-sync runs! 🚀
- Files copied to DocsHub
- Site rebuilt
- Pushed to GitHub
- Live at docs.isutech.co.za
Troubleshooting
Section titled “Troubleshooting”Sync Didn’t Run Automatically
Section titled “Sync Didn’t Run Automatically”Check if hook is executable:
ls -l /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commit# Should show: -rwxr-xr-x (executable)
# If not executable:chmod +x /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commitCheck if docs changed:
# The hook only runs if docs-new/ changedgit diff-tree --no-commit-id --name-only -r HEAD | grep "docs-new/"Manual Sync Failed
Section titled “Manual Sync Failed”Check permissions:
ls -l /root/scripts/sync-thrivesend-docs.sh# Should be executable
# Fix if needed:chmod +x /root/scripts/sync-thrivesend-docs.shCheck directories exist:
ls -la /root/projects/active/thrive-send-b2b2g/docs-new/ls -la /var/www/docs/repo/docs/products/thrivesend-technical/Git Push Failed
Section titled “Git Push Failed”If GitHub push fails, you can push manually:
cd /var/www/docs/repogit push origin mainFile Not Syncing
Section titled “File Not Syncing”Force a manual sync:
/root/scripts/sync-thrivesend-docs.shCheck rsync output:
# Run sync script and look for file in output/root/scripts/sync-thrivesend-docs.sh 2>&1 | grep "your-file.png"Disabling Auto-Sync
Section titled “Disabling Auto-Sync”If you need to disable automatic syncing temporarily:
# Rename the hook to disable itmv /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commit \ /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commit.disabled
# Re-enable latermv /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commit.disabled \ /root/projects/active/thrive-send-b2b2g/.git/hooks/post-commitTesting the System
Section titled “Testing the System”Test Automatic Sync
Section titled “Test Automatic Sync”cd /root/projects/active/thrive-send-b2b2g
# Create a test fileecho "Test content" > docs-new/test-sync.md
# Commit itgit add docs-new/test-sync.mdgit commit -m "Test auto-sync system"
# Watch for auto-sync output# Should see: 🔄 Documentation changes detected!
# Clean upgit rm docs-new/test-sync.mdgit commit -m "Remove test file"Test Manual Sync
Section titled “Test Manual Sync”# Run manual sync/root/scripts/sync-thrivesend-docs.sh
# Should see full sync output with steps 1-7Benefits
Section titled “Benefits”✅ No Manual Steps - Commit once, syncs everywhere ✅ Always in Sync - DocsHub always has latest docs ✅ Fast Updates - Live within seconds of commit ✅ Error Detection - Shows clear error messages ✅ Git History - Full history in both repos ✅ Safety - Only syncs if docs changed
Related Documentation
Section titled “Related Documentation”- User Guide: How to add screenshots and documentation
- DocsHub: https://docs.isutech.co.za/products/thrivesend-technical/
- ThriveSend Repo: https://github.com/gedeza/thrive-send-b2b2g
- Knowledge Hub Repo: https://github.com/gedeza/isutech-knowledge-hub
Last Updated: January 26, 2026 Maintained By: iSu Technologies Team