Always keep a copy of the currently-deployed version of a Pages site
In https://gitlab.com/gitlab-org/gitlab-ce/issues/45481#note_70683890 we modify GitLab so that Pages deployment artifacts have the same expiration logic as any other artifact (previously, they would be expired immediately after deployment). This fixes some bugs and oddities, but we can improve things further.
To ensure that we can always reconstruct a -pages-root
following a catastrophic storage failure, or in the event of non-backward-compatible changes to layout or deployment logic, we should pin the most recently deployed artifact, and prevent it from being automatically expired or erased.
Manual expiry or erasure should continue to work, to cover cases like "I accidentally deployed a pages site containing my credentials".
Ensure non-currently-deployed versions of Pages are expired properly:
-
A new version was deployed before the default expiration, and then the expiration time is reached -
A new version was deployed after the default expiration