Add optional persistent storage between Pages runs
Problem to Solve
I'm working with contributors to the Flatpak project and they're exploring migrating to GitLab. They explored using GitLab pages for the distribution of applications after these are built. The problem they ran into is that every run of Pages generates a new (from scratch) OStree repo, which means they always throw away the entire history, and can't do e.g. efficient delta updates/incrementally modify the contents of the site.
Additionally, the script tries to cache the installation of the dependencies (the sdk and platform), which takes a while to download, but it seems that they often don't get the cached data back when running a build (this is because artifacts are not guaranteed to be persisted).
See also the GitLab docs use case: https://gitlab.com/gitlab-org/gitlab-ce/issues/29498#note_149267590
Proposal
One solution would be to provide a keyword such as persistent_paths
which would be persisted from the previous run:
pages:
stage: deploy
script: echo something
artifacts:
persistent_paths:
- /^public\/\d{1,2}\.\d{1,2}$/
paths:
- public