Automation
Automation
Blog publishing is wired around config.yml.
If you want the ultra-simple version, read EASY_POSTING_GUIDE.md.
Setup
- Keep writing posts in
_posts/using Markdown frontmatter. - Review
config.ymlor copyconfig.example.ymlif you want a fresh baseline. - Add GitHub Actions secrets:
DEVTO_TOKENHASHNODE_TOKENHASHNODE_PUBLICATION_ID- Optional social secrets:
X_API_KEYX_API_SECRETX_ACCESS_TOKENX_ACCESS_TOKEN_SECRETMASTODON_HOSTMASTODON_ACCESS_TOKENBLUESKY_HOSTBLUESKY_IDENTIFIERBLUESKY_APP_PASSWORDLINKEDIN_ACCESS_TOKENDISCORD_BOT_TOKENDISCORD_CHANNEL_IDDISCORD_WEBHOOK_URLTELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
Commands
npm run post:import -- --source "/full/path/to/draft.txt" --tags "ai,llm"npm run post:new -- --title "My New Post" --description "Short summary" --tags "ai,llm"npm run normalize:frontmatternpm run publish:devtonpm run publish:hashnodenpm run post:socialnpm run verify:automation
Safe Verification
- Dry-run a single post to dev.to:
DRY_RUN=1 POST_PATH=_posts/2026-04-15-what-i-look-for-in-agentic-products.md npm run publish:devto - Dry-run a single post to Hashnode:
DRY_RUN=1 POST_PATH=_posts/2026-04-15-what-i-look-for-in-agentic-products.md npm run publish:hashnode - Dry-run social fan-out:
DRY_RUN=1 POST_PATH=_posts/2026-04-15-what-i-look-for-in-agentic-products.md npm run post:social - Real publish of one post:
POST_PATH=_posts/2026-04-15-what-i-look-for-in-agentic-products.md npm run publish:devtoPOST_PATH=_posts/2026-04-15-what-i-look-for-in-agentic-products.md npm run publish:hashnode
GitHub Actions
- Push a new markdown file under
_posts/tomainand CI will auto-publish it. - For a manual run, open the
Blog Publishworkflow, setpost_path, and optionally enabledry_run.
Notes
canonical_urlis filled automatically fromhttps://sandeeps.tech/blog/{slug}/when missing.- Medium stays disabled by default until a working token is available.
- Social fan-out caches
.automation/social-post-state.jsonin CI so reruns do not repost the same canonical URL. - Publish scripts do not fall back to the latest post on CI anymore; they only act on changed posts or an explicit
POST_PATH.