| Server IP : 85.155.190.233 / Your IP : 216.73.216.103 Web Server : nginx/1.24.0 System : Linux antigravity-cli 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 User : wp-moonbloom ( 1001) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /opt/Gemini_Swarm_Core/docs/ |
Upload File : |
# WordPress Blog Writer Automation (proimport-shop.ru)
This document describes the automated GitOps pipeline configured for the `wordpress_blog_writer` task within the Antigravity Swarm Core.
---
## 📅 Scheduler Task Configuration
* **Task Name:** `wordpress_blog_writer`
* **Target Workspace:** `/root/workspaces/telegram_pro_import`
* **Default Schedule:** `0 2 * * 2,5` (Tuesday and Friday at 02:00 UTC)
* **Current Status:** **Inactive (`active = 0` by default)**.
* *Note:* The schedule runs inside `tg_bridge.py` on the VPS via the `TrendScoutManager` background loop. It will immediately skip execution as long as `active = 0` in the `swarm_tasks` table.
---
## 🛠️ Execution Pipeline (Roy Tasks)
When the scheduler triggers, the Swarm (running in the context of `/root/workspaces/telegram_pro_import` using the local OAuth token) executes the following flow:
```mermaid
graph TD
A[Scheduler fires task] --> B[Read next pending post in articles_queue.json]
B --> C[Set status to 'processing' and save]
C --> D[Run scripts/yandex_wordstat.py for keyword research]
D --> E[Draft articles/slug.md using wordpress-seo-writer skill]
E --> F[Generate articles/slug.html via Stitch MCP]
F --> G[Convert images to WebP and save under articles/images/]
G --> H[Update articles/blog-page.html list card]
H --> I[Commit & Push all changes to main branch]
I --> J[Set status to 'published' in articles_queue.json, commit & push]
J --> K[GitHub Actions deploys HTML and runs Recrawl/IndexNow APIs]
```
---
## 🔑 Environment & Secrets Configuration
### Local VPS Environment (`/root/workspaces/telegram_pro_import/.env`)
* Contains only the SEO keyword research API key:
```env
YANDEX_SEARCH_API_KEY=[REDACTED]
```
*(This file is excluded from Git to prevent secret exposure).*
### GitHub Repository Secrets (GitHub Actions)
Deploy and post-deploy indexing tokens are securely stored as Actions Secrets on GitHub under `Azhy34/telegram_pro_import`:
* `DEPLOY_HOST` / `DEPLOY_USER` / `DEPLOY_PORT` / `DEPLOY_KEY` — SSH deployment credentials to the target WordPress server.
* `WP_PATH` — Remote directory path of the WordPress installation.
* `YANDEX_WEBMASTER_TOKEN` — Yandex OAuth token for API authentication.
* `YANDEX_WEBMASTER_USER_ID` — Yandex Webmaster user ID (default: `426403858`).
* `YANDEX_WEBMASTER_HOST_ID` — Host ID (default: `https:proimport-shop.ru:443`).
---
## 🚦 How to Manage & Activate
1. **Activate Scheduler:**
Run SQL on the VPS database (`/opt/Gemini_Swarm_Core/sessions.db`):
```sql
UPDATE swarm_tasks SET active = 1 WHERE task_name = 'wordpress_blog_writer';
```
2. **Deactivate Scheduler:**
```sql
UPDATE swarm_tasks SET active = 0 WHERE task_name = 'wordpress_blog_writer';
```
3. **Change Time/Schedule:**
```sql
UPDATE swarm_tasks SET cron_expression = '0 3 * * 2,5' WHERE task_name = 'wordpress_blog_writer';
```
*Note: After database edits, restart the service:*
```bash
systemctl restart tg-bridge.service
```