See #1892 for details
Here's the process I'm doing by hand (see #2136 for an example):
Create a new branch of my site-www repo.
Go to https://github.com/dart-lang/sdk/blob/master/pkg/analyzer/tool/diagnostics/diagnostics.md, click the Raw button, and Save as _pathToRepo_/src/tools/diagnostic-messages.md.
Commit the changes, then view the diffs and make sure they look reasonable. If you need to make changes, then make them in a separate commit.
Stage the file to make sure it has no obvious formatting issues.
Inform @bwilkerson of any issues/changes you had to make.
Once the file is ready, create a PR ~that references the version of the diagnostics.md file~.
Thinking about how to automate this, I'm not positive it should be automated, but perhaps it'd be good to have a build check (failable) about whether this file should be updated.
Yes, that is what I had in mind; similar to what we do with the code-excerpt refresh. I.e., actual code refresh is under site-maintainer control (and done manually using a single command), but the build scripts ensure that everything is up-to-date.