instatic-cms / push_to_hf.sh
Dolor David Prince
feat: InStatic CMS AI pipeline with docs brain
407171a
Raw
History Blame Contribute Delete
1.43 kB
#!/bin/bash
# Push InStatic CMS to HuggingFace Space: Daviddolor/instatic-cms
# Run from INSIDE the instatic-cms directory
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo "Enter your HuggingFace token (write access):"
read -s HF_TOKEN
SPACE_URL="https://Daviddolor:${HF_TOKEN}@huggingface.co/spaces/Daviddolor/instatic-cms"
# Clone or pull existing space
if [ -d ".git" ]; then
echo "Git repo already initialized"
else
git init
git branch -M main
fi
# Set remote
git remote remove hf 2>/dev/null || true
git remote add hf "$SPACE_URL"
git config user.email "personaldolor@gmail.com"
git config user.name "Dolor David Prince"
# Stage everything
git add README.md Dockerfile requirements.txt app.py docs_brain/
git status --short
git commit -m "feat: InStatic CMS β€” AI pipeline with WordPress/GitHub/Android/FastAPI docs brain
Pipeline: Analyze β†’ Plan β†’ Generate β†’ Validate β†’ AutoFix β†’ Deploy
Docs brain: wordpress.md, github.md, android.md, fastapi.md
LLM: Groq β†’ OpenRouter β†’ Cerebras fallback chain
Streaming SSE progress endpoint
Background job queue with polling"
echo "===== PUSHING TO HF SPACE ====="
git push hf main --force
echo ""
echo "βœ… Pushed to https://huggingface.co/spaces/Daviddolor/instatic-cms"
echo "Space will rebuild in ~2 minutes"
echo ""
echo "Set these secrets in the HF Space settings:"
echo " GROQ_API_KEY"
echo " OPENROUTER_API_KEY"
echo " CEREBRAS_API_KEY"