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>
As part of wiring in the version of the CLI into the docs build process,
we should also show this version to users, so they're aware what version
of the docs they're looking at.
To put this into the footer, the simplest place is to overwrite the
existing `copyright.html`[0], and remove the (unused) copyright
configuration.
We make the inclusion of the version optional, to make it possible to
merge + release this before the docs site has the version wired in.
For this to work, we need to fetch the `RENOVATE_VERSION` from the
environment (if present).
[0]: https://github.com/squidfunk/mkdocs-material/blob/9.7.0/material/templates/partials/copyright.html