chore: don't include announcement bar in release notes' attachment
When building the docs site in CI on `main` (or a release branch), we
currently package up the docs site into the GitHub Release.
However, this includes the "announcement bar", which can include stale
info.
In the case where a user is looking to add a mirror for their Renovate
CLI docs[0], this means they now see an announcement bar which includes
unhelpful - and possibly outdated - information.
As noted in #44030, we can improve this to:
- not include the announcement bar when preparing the attachment for the
release
- include the announcement bar only when we're updating the docs site
To do this, we need to:
- add a new `--no-announcement` flag (which ensures the default is "do
add the announcement")
- log when we're not using announcements
- detect the environment variable when building the mkdocs site locally
This means we'll always be rebuilding the docs site (to inject the
announcement bar) which is ~16s as of a recent run.
[0]: https://www.jvt.me/posts/2024/11/19/renovate-private-docs/
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>