Initial scaffold: reader-magnet course stub for thistleandmoth.org
Sync courses / sync (push) Failing after 5s

Mirrors michaelferrara-eec-courses. course.yml is active: false and
all copy is TODO until the real reader-magnet file/cover art are
ready and the thistleandmoth-list Listmonk list exists.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-16 13:21:31 -04:00
commit 6768489072
5 changed files with 109 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
name: Sync courses
on:
push:
branches: [master]
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Package and sync
run: |
tar czf /tmp/courses.tar.gz courses
status=$(curl -s -o /tmp/sync-response.json -w '%{http_code}' \
-X POST "http://eec-thistleandmoth:8080/admin/sync" \
-H "Authorization: Bearer ${THISTLEANDMOTH_EEC_SYNC_TOKEN}" \
--data-binary @/tmp/courses.tar.gz)
cat /tmp/sync-response.json
echo
if [ "$status" -ge 300 ]; then
echo "sync failed with status $status"
exit 1
fi
env:
THISTLEANDMOTH_EEC_SYNC_TOKEN: ${{ secrets.THISTLEANDMOTH_EEC_SYNC_TOKEN }}
+55
View File
@@ -0,0 +1,55 @@
# thistleandmoth-eec-courses
Course content for [eec](https://gitea.reground.org/will/eec), the self-paced
email course engine — this instance served at eec.thistleandmoth.org. Push to
`master` and CI syncs `courses/` straight to production — there's no staging
step, so treat a push here the same as a push to `eec` itself.
Full reference for course/step file format, `course.yml` fields, the
readiness step, drip-triggered courses, and sync guardrails lives in the
[`eec-courses`](https://gitea.reground.org/will/eec-courses) README — the
format is identical, only the target instance differs.
## Layout
```
courses/
reader-magnet/
course.yml
day-0.md
day-1.md
```
`reader-magnet` is the funnel for thistleandmoth.org's `/gift` page (see the
`thistleandmoth-site` repo). Same shape as michaelferrara.org's: landing page
signup → subscriber added to the thistleandmoth.org Listmonk list immediately
(`signup_list_name` in `course.yml`, no click required) → the reader-magnet
file email goes out (`{{.CTALink}}` in `day-0.md` is a direct download link,
not a webpage) → a day-1 follow-up email 24h later with no list/conversion
mechanics of its own.
## Stub — two things need to happen before this goes live
1. **`course.yml` is `active: false`.** All the content below is a
placeholder (TODO subject lines, TODO body copy, and a `redirect_url`
pointing at a file that doesn't exist yet in the `thistleandmoth-downloads`
bucket — see `thistleandmoth-site`'s `/gift` page, which is the same kind
of stub). Replace the TODOs with real copy once the reader-magnet file and
cover art are ready, then flip `active: true`.
2. **`signup_list_name: "thistleandmoth-list"` doesn't exist yet in
Listmonk.** Sync rejects the course outright if the name doesn't resolve
to exactly one list — create that list in the Listmonk admin UI first
(matching the naming convention of `michaelferrara-list` /
`Two Squirrels Press`), then push.
Until both of those are done, CI runs against this repo will fail sync with
a clear error — that's expected, not a sign anything's broken.
## Deploying
Push to `master``.gitea/workflows/sync.yml` tars up `courses/` and
`POST`s it to this domain's `eec-thistleandmoth` container over the internal
Docker network, authenticated with `THISTLEANDMOTH_EEC_SYNC_TOKEN` (a Gitea
Actions secret shared with the `eec-thistleandmoth` Ansible role's copy). No
separate deploy step, no staging — a push here goes live immediately (once
`active: true` and the Listmonk list exist).
+11
View File
@@ -0,0 +1,11 @@
active: false
slug: reader-magnet
name: "Reader Magnet (TODO: story title)"
from_email: hello@thistleandmoth.org
ceiling_hours: 24
signup_list_name: "thistleandmoth-list"
steps:
- file: day-0.md
- file: day-1.md
+12
View File
@@ -0,0 +1,12 @@
---
subject: "TODO: subject line — here's your story"
redirect_url: "https://downloads.thistleandmoth.org/reader-magnet/story.epub"
---
TODO: day-0 email copy goes here.
[Get my story]({{.CTALink}})
Talk soon,
Thistle & Moth
+5
View File
@@ -0,0 +1,5 @@
---
subject: "TODO: day-1 follow-up subject"
---
TODO: day-1 follow-up copy goes here.