Skip to content

Add a daily article publisher action for the blog - #10

Closed
DigitalTsotsi wants to merge 1 commit into
mainfrom
dev_asfa
Closed

Add a daily article publisher action for the blog#10
DigitalTsotsi wants to merge 1 commit into
mainfrom
dev_asfa

Conversation

@DigitalTsotsi

Copy link
Copy Markdown
Collaborator

Adds a scheduled GitHub Action that posts a new article to the blog each day and opens a pull request with it for review, so nothing goes live until it is merged.

What it does, once a day:

  • picks a topic from a rotating list aligned with the blog's themes (multimodal search, physical AI, edge, streaming, video and audio search),
  • generates the article text, preferring Bright Data's Google AI Mode, falling back to SerpApi's Google AI Overview, and finally to the topic's own built-in body so a complete article is produced even before any key is set,
  • renders it into the same HTML template the existing articles use, saves it as articles/YYYYMMDD-slug.html, and adds it to the top of the index,
  • commits it on a branch and opens a pull request. It is idempotent per day, so a second run the same day does nothing.

To turn on the live AI content, add two repository secrets (the same values already used by the release bot): BRIGHT_DATA_API_KEY and SERP_API_KEY. Both are optional; with neither set it still publishes using the built-in topic bodies.

For the action to open pull requests, Settings, Actions, General, Workflow permissions must allow GitHub Actions to create and approve pull requests.

You can also run it by hand from the Actions tab (publish-article), with a dry-run option that renders and logs an article without opening a pull request, and an option to force a specific topic.

This also adds a small CI workflow that runs the offline test suite (24 tests) on every push and pull request. More detail is in publisher/README.md.

@DigitalTsotsi

Copy link
Copy Markdown
Collaborator Author

GitHub Actions CI (online):

Push run: https://github.com/v-modal/v-modal.github.io/actions/runs/31208223563 (success)
Pull request run: https://github.com/v-modal/v-modal.github.io/actions/runs/31208226106 (success)

Local run:

python -m pytest -q
........................ [100%]
24 passed in 0.12s

Verified end to end locally as well: a real run renders articles/20260807-multimodal-embeddings.html using the same HTML template as the existing articles and prepends its entry to the top of index.html; running again the same day is a no-op (one article per day). With no content keys set it falls back to the topic's built-in body, so the output is well formed before Bright Data or SerpApi is configured.

@DigitalTsotsi

Copy link
Copy Markdown
Collaborator Author

Closing this. Per the updated plan, the daily article action now lives in the private bot repo and commits the generated HTML into this repository instead. Superseded by https://github.com/arita37/vmx_bot/pull/6 .

@DigitalTsotsi
DigitalTsotsi deleted the dev_asfa branch August 8, 2026 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant