One folder per post: the slides as 1.jpg, 2.jpg… and caption.txt. day-NN-name/
folders are the queue, posted in order; on-YYYY-MM-DD-name/ folders are seasonal posts
that go out on that date instead, and the queue slips a day.
They’re made by marketing/instagram/Build-Posts.ps1 in the private app repo
(-PublishTo C:\Repos\rtnwapp\instagram copies them here). The site serves them at
https://blog.rtnw.app/instagram/..., which is where Instagram fetches them from.
.github/workflows/instagram.yml runs post-next.js daily at 18:00 UTC. It posts the
lowest-numbered day not yet in posted.json, then commits posted.json. A missed day
isn’t skipped; the queue just moves on a day later.
IG_USER_ID, IG_ACCESS_TOKEN and SECRETS_PAT (the GitHub token), and the variable
INSTAGRAM_ENABLED = true.The Instagram token lasts 60 days. instagram-token.yml refreshes it every Monday and
stores the new one, so it never runs out while that works. It stops working when the
GitHub token expires, so renew that before its expiry date.
Dry run locally: DRY_RUN=1 node instagram/post-next.js