Skip to content

Commit f2762a9

Browse files
ccross2claude
andcommitted
ci: add daily thesis post workflow + post first 2 items
Replace local cron (unreliable — machine sleep) with GitHub Actions workflow running at 14:00 UTC daily. Workflow commits queue status back to repo after each post. Posts #1 and #2 published manually to catch up on overdue items. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 777522f commit f2762a9

File tree

2 files changed

+67
-6
lines changed

2 files changed

+67
-6
lines changed

.github/workflows/daily-post.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Daily Thesis Post
2+
3+
# Posts the next pending item from content-queue.json at 10 AM ET (14:00 UTC).
4+
# Commits the updated queue back so posted status is tracked in git.
5+
6+
on:
7+
schedule:
8+
- cron: "0 14 * * *"
9+
workflow_dispatch:
10+
inputs:
11+
dry_run:
12+
description: "Preview only, no post"
13+
required: false
14+
default: false
15+
type: boolean
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
post:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: "20"
32+
cache: npm
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Post next queued item
38+
env:
39+
TWITTER_API_KEY: ${{ secrets.TWITTER_API_KEY }}
40+
TWITTER_API_SECRET: ${{ secrets.TWITTER_API_SECRET }}
41+
TWITTER_ACCESS_TOKEN: ${{ secrets.TWITTER_ACCESS_TOKEN }}
42+
TWITTER_ACCESS_SECRET: ${{ secrets.TWITTER_ACCESS_SECRET }}
43+
run: |
44+
if [ "${{ inputs.dry_run }}" == "true" ]; then
45+
node scripts/daily-post.js --dry-run
46+
else
47+
node scripts/daily-post.js
48+
fi
49+
50+
- name: Commit queue update
51+
if: inputs.dry_run != 'true'
52+
run: |
53+
git config user.name "github-actions[bot]"
54+
git config user.email "github-actions[bot]@users.noreply.github.com"
55+
if git diff --quiet scripts/content-queue.json; then
56+
echo "No queue changes to commit (no post was due or post failed)"
57+
else
58+
git add scripts/content-queue.json
59+
git commit -m "post: mark queued item as posted [automated]"
60+
git push
61+
fi

scripts/content-queue.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@
66
"id": 1,
77
"text": "Most privacy tools ask you to trust someone else's server. We think that is a contradiction. Sovereign means your hardware, your keys, your compute. No exceptions.",
88
"category": "thesis",
9-
"status": "pending",
9+
"status": "posted",
1010
"scheduled": "2026-03-29",
11-
"posted_at": null,
12-
"tweet_id": null
11+
"posted_at": "2026-03-30T13:53:36.410Z",
12+
"tweet_id": "2038615629108830271"
1313
},
1414
{
1515
"id": 2,
1616
"text": "Privacy is not a spectrum. Either the data stays on your hardware or it does not. There is no \"mostly private.\"",
1717
"category": "thesis",
18-
"status": "pending",
18+
"status": "posted",
1919
"scheduled": "2026-03-30",
20-
"posted_at": null,
21-
"tweet_id": null
20+
"posted_at": "2026-03-30T13:53:40.719Z",
21+
"tweet_id": "2038615647207195049"
2222
},
2323
{
2424
"id": 3,

0 commit comments

Comments
 (0)