ci: add staging deployments
To less technically skilled users to contribute to the website, we must not rely on people using git and hugo locally. Instead, the CI pipeline must be able to take care of building and deploying development snapshots. For this, staging deployments are required.
The actual CI part of this is pretty easy and I can adapt the AdminDB staging deployments for this.
However, this requires some host run deploy the staging websites to.
This can be any web server where the website can be made accessible under a sub-path
(e.g. web-2 with a test domain with URLs like https://test-website.fem-net.de/my-ref/
, if my-ref
is the commit ref that is deployed).
So, the steps to implement this are as follows:
- Request a domain to deploy dev versions of the website to (hostmaster)
- Request a webroot for this domain to rsync the files to (webserver)
- Create a deploy key for this staging webroot (Important: must be different from the production key, since this runs in MR pipelines!)
- Create the required CI jobs to deploy to a staging environment and clean up the staging environment after some time (can be adopted from the AdminDB CI pipeline)
- Profit
This was already discussed with @jale in person.