SRE-Alerting-Guidelines

A peer-to-peer style guide for writing effective alerts. This is the long-term,
transparent home for the guide's content and its living issue tracker; the
finished guide is published as a document under
writings.conall.dev/documents/.
Content
sre-alerting-guidelines.md at the repo root
is the guide itself — the one file to edit. Everything else in the repo is
tooling that exists to preview it.
Every heading carries an explicit anchor, e.g. ## Coverage {#coverage}, so
links such as /documents/sre-alerting-guidelines/#coverage stay valid when a
heading is reworded. Keep the id when you rename a heading, and give a new
heading a unique one. Hugo drops the {#...} from the rendered page; GitHub's
view of the file and the Markdown edition show it literally.
Preview site
All the Hugo scaffolding (config, theme, layout) lives under
preview/, so it doesn't bury the content. preview/hugo.toml
mounts the top-level sre-alerting-guidelines.md straight into Hugo's
content tree (a [[module.mounts]] entry, not a copy or symlink — Hugo
won't follow a symlink that escapes the site root), so there's a single
canonical copy of the text.
git submodule update --init --recursive preview/themes/PaperMod
cd preview && hugo server --buildDrafts
Cloudflare preview deployments
wrangler.jsonc (repo root) and preview/scripts/ci-build.sh mirror the
pattern used by writings.conall.dev: connect this repo to a Cloudflare
Workers Builds project (dashboard → Workers & Pages → Create → Import a
repository), build command bash preview/scripts/ci-build.sh, output
directory preview/public. It then builds every branch automatically:
main deploys to the project's production URL.
- Any other branch deploys to a preview URL of the form
https://<branch-slug>-sre-alerting-guidelines.<workers-dev-subdomain>.workers.dev/
(the build script derives the slug from WORKERS_CI_BRANCH and overrides
baseURL accordingly, so internal links stay on the preview domain).
Previews need no GitHub Actions workflow — Cloudflare builds straight off
whatever branch you push here. (Publishing to writings.conall.dev is separate;
see below.)
Pull requests that change the guide also get a preview of the guide on the real
writings.conall.dev site layout: .github/workflows/preview.yml
builds the writings.conall.dev site with the PR's copy of the guide dropped in,
uploads it as a preview version of the writings Worker, and comments the link on
the PR. The header of that workflow lists the two Cloudflare secrets it needs.
Publishing
Merging a change to sre-alerting-guidelines.md on main publishes it:
.github/workflows/publish-to-writings.yml
copies the file to content/documents/sre-alerting-guidelines/index.md in
conallob/writings.conall.dev
and pushes it to that repo's main, which Cloudflare then deploys. This repo's
copy stays the editable source of truth; the writings repo copy is generated
and shouldn't be edited by hand. The guide's front matter lastmod is stamped
by the workflow with the merge commit's date in the published copy, so it can
be stale here. The site shows it as "Last Edited" in the page header, above the
table of contents, because the front matter sets showLastMod: true.
Repository structure
.
├── sre-alerting-guidelines.md # the guide (edit this)
├── .github/workflows/ # publish-to-writings.yml (deploy-key sync)
├── wrangler.jsonc # Cloudflare Workers Builds deploy config
└── preview/ # Hugo preview site (config/theme/tooling only)
├── hugo.toml
├── archetypes/
├── content/ # site scaffolding (_index.md pages); the
│ # guide itself is mounted in, not stored here
├── scripts/ci-build.sh
└── themes/PaperMod/ # git submodule
Use the guide as a Claude Code skill