diff --git a/.gitea/workflows/sync-template.yml b/.gitea/workflows/sync-template.yml index fe6cd6f..ed19285 100644 --- a/.gitea/workflows/sync-template.yml +++ b/.gitea/workflows/sync-template.yml @@ -15,10 +15,8 @@ jobs: - name: Install eec-campaigns run: go install gitea.reground.org/will/eec-campaigns@v0.1.4 - # TODO: rename "TEMPLATE default" below to " default" - # (or any name you like) as part of customizing this template. - name: Sync template to listmonk - run: eec-campaigns template "TEMPLATE default" email-templates/campaign.html + run: eec-campaigns template "sunfloweracres default" email-templates/campaign.html env: LISTMONK_BASE_URL: ${{ secrets.CAMPAIGNS_LISTMONK_BASE_URL }} LISTMONK_API_USER: ${{ secrets.CAMPAIGNS_LISTMONK_API_USER }} diff --git a/README.md b/README.md index e003318..e832408 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,27 @@ -# campaigns-template +# sunfloweracres-campaigns -Gitea template repo for standing up a new domain/client's campaign content repo. Generate a new repo from this one (Gitea → this repo → "Generate Repo," or `POST /api/v1/repos/generate/will/campaigns-template`) rather than cloning it — generating starts the new repo with a clean history of its own. +sunfloweracressoaps.com's campaign content, synced to listmonk by [`eec-campaigns`](https://gitea.reground.org/will/eec-campaigns). This repo holds only campaign content and this domain's listmonk secrets — the tool itself is installed at a pinned version in CI. -Full reference for everything below lives in the [`eec-campaigns` README](https://gitea.reground.org/will/eec-campaigns). +## To send a campaign -## After generating a new repo from this template +1. Write `campaigns//campaign.md` (frontmatter + Markdown body — see the [eec-campaigns README](https://gitea.reground.org/will/eec-campaigns#campaignmd) for the full field reference). Set `from_email: "Sunflower Acres "` explicitly — there's no default, and sync rejects a campaign with no `from_email` at all. Mailcow's Sender ACL must allow that exact address for the send to go through rather than bounce as spoofing (see Sending as hello@sunfloweracressoaps.com below). +2. `git push` to `master` — CI syncs it into listmonk as a **draft** and emails a preview to `CAMPAIGNS_PREVIEW_EMAIL` (or the campaign's own `preview_emails`). +3. Check the preview inbox. Keep pushing edits until it looks right — each push re-syncs and re-previews. +4. When ready to actually send: `git tag send/ && git push origin send/`. This is the one action that transitions the campaign from draft to running — a plain `git push` to master can never do it. -1. **Rename the template.** In `.gitea/workflows/sync-template.yml`, replace `TEMPLATE default` with a name specific to this domain (e.g. ` default`). -2. **Restyle `email-templates/campaign.html`** if this client wants different branding than the stock listmonk template it starts as. -3. **Add repo secrets** (Gitea Actions → Secrets): `CAMPAIGNS_LISTMONK_BASE_URL`, `CAMPAIGNS_LISTMONK_API_USER`, `CAMPAIGNS_LISTMONK_API_TOKEN`, and optionally `CAMPAIGNS_PREVIEW_EMAIL` — scoped to this domain's own listmonk instance and its own dedicated API user (see `reground-infrastructure`'s `campaigns` Ansible role for provisioning that user). -4. **Check the tool version pin** in all four `.gitea/workflows/*.yml` files (currently `v0.1.0`) — bump it only deliberately, after confirming a newer `eec-campaigns` release works. -5. Run the `Sync default campaign template` workflow once. -6. Replace this README with a short one for this domain (see `reground-campaigns`'s README for the pattern: a numbered "to send a campaign" list for whoever operates this repo day-to-day). -7. Give the client push/PR access to *this repo only* — that's the entire isolation boundary. They never need access to `eec-campaigns`, `campaigns-template`, or any other domain's repo. +Alternatively, run the `Send campaign` workflow manually from Gitea Actions with the slug as input — same effect as the tag push. -## Layout +## Other workflows -``` -campaigns/ - / - campaign.md -email-templates/ - campaign.html -.gitea/workflows/ - sync.yml # push to master -> draft + preview - send.yml # tag push send/, or manual dispatch -> real send - test.yml # manual dispatch -> re-preview without touching status - sync-template.yml # manual dispatch -> push email template as listmonk default -``` +- **`Test-send campaign`** (manual) — re-preview a campaign's current content to any address, without touching its status. +- **`Sync default campaign template`** (manual) — pushes `email-templates/campaign.html` into listmonk as the default campaign template. Run once after setup, and again whenever that file changes. + +## Setup + +Repo secrets (Gitea Actions → Secrets) are already set: `CAMPAIGNS_LISTMONK_BASE_URL`, `CAMPAIGNS_LISTMONK_API_USER`, `CAMPAIGNS_LISTMONK_API_TOKEN`, `CAMPAIGNS_PREVIEW_EMAIL` (`hello@sunfloweracressoaps.com`, also a confirmed subscriber on `sunfloweracres-list` so test-sends have somewhere to go) — scoped to a dedicated `campaigns-sunfloweracres` listmonk API user (see `reground-infrastructure`'s `campaigns-sunfloweracres` Ansible role). + +The workflows in `.gitea/workflows/` pin a specific `eec-campaigns` version (currently `v0.1.4`). Bump that pin deliberately when a new tool version is ready, not automatically. + +## Sending as hello@sunfloweracressoaps.com + +Listmonk sends everything — every domain's campaigns — authenticated as one shared identity, `hello@reground.org`. For a campaign here to actually go out `From: hello@sunfloweracressoaps.com` instead of bouncing as a spoofing attempt, Mailcow's Sender ACL on `hello@reground.org` has to explicitly allow it — confirm this is in place (see `reground-infrastructure`'s `campaigns-sunfloweracres` role, which flags it as a manual step) before relying on a real send. diff --git a/campaigns/welcome/campaign.md b/campaigns/welcome/campaign.md index f4d0b68..56a63be 100644 --- a/campaigns/welcome/campaign.md +++ b/campaigns/welcome/campaign.md @@ -1,18 +1,25 @@ --- -subject: "Welcome!" -lists: ["Newsletter"] -from_email: "Your Name " +subject: "Welcome to Sunflower Acres" +lists: ["sunfloweracres-list"] +from_email: "Sunflower Acres " tags: ["welcome"] --- -This is a sample campaign showing the `campaign.md` format — edit it, rename -its directory, or delete it entirely once you've got the hang of things. See -the [eec-campaigns README](https://gitea.reground.org/will/eec-campaigns#campaignmd) -for the full field reference. - {{ if .Subscriber.Attribs.first_name }}Hi {{ .Subscriber.Attribs.first_name }},{{ else }}Hi there,{{ end }} -Thanks for subscribing! You'll hear from us here whenever we've got something -worth sharing. +Thanks for signing up. Here's what you can expect from us: notes on new batches, honest word when something's running low or out, and the occasional look at how a bar actually gets made. -Talk soon. +Every bar we sell is cold-processed by hand, in small batches, and cured for six weeks before it ever reaches you. We keep the ingredient lists short and recognizable — things like rolled oats, French green clay, activated charcoal, oat milk, local honey, and shea butter, not a wall of things you'd need to look up. + +Right now the lineup is: + +- **Lavender Oatmeal Bar** — $8, gentle enough for every day +- **Clay & Charcoal Mint Bar** — $9, running low +- **Oat Milk & Honey Bar** — $8, unscented and mild +- **Cedar & Sage Bar** — $9, currently out while we cure the next batch + +If something's out, we'll tell you rather than let you guess — that's the whole point of this list. + +Talk soon, +Matthew & Marisol +Sunflower Acres diff --git a/email-templates/campaign.html b/email-templates/campaign.html index c83add3..e5ea727 100644 --- a/email-templates/campaign.html +++ b/email-templates/campaign.html @@ -1,14 +1,14 @@ @@ -19,56 +19,58 @@ just Listmonk's default look. - +
 
-