CI: deploy_gitlab_ci: Move one-time code to own function as reference
Initially the moved code was needed to create the files including the new implementation.
Initially the moved code was needed to create the files including the new implementation.