The source project of this merge request has been removed.
Add gitlab templates for some website jobs
Consider this as a suggestion, feedback is welcome!
This is a first draft to port the Jenkins website jobs for Hugo and Sphinx app docs to GitLab.
I am not sure if this how we like to do it, I am especially unsure about the ssh/deploy part. It requires to setup the ssh key as a variable for each repository, that needs to deploy a website.
Of course I couldn't test it with KDE infrastructure, but I tested it with GitLab.com and my private server.
Usage Examples
For sphinx:
include: https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/website-sphinx-app-docs.yml
variables:
EPUB_NAME: KdenliveManual
WEBSITE_DOMAIN: docs.kdenlive.org
build_german_docs:
extends: .build_sphinx_app_docs
variables:
BUILD_LANGUAGE: de
For simple hugo:
include: https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/website-hugo.yml
variables:
WEBSITE_DOMAIN: develop.kde.org
Hugo for the cases of where we have staging (probably possible to simplify that a bit more):
include: https://invent.kde.org/sysadmin/ci-utilities/raw/master/gitlab-templates/website-hugo.yml
variables:
WEBSITE_DOMAIN: kde.org
workflow:
rules:
- if: $CI_COMMIT_BRANCH == "work/staging" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "work/staging"
variables:
WEBSITE_DOMAIN: www-staging.kde.org
HUGO_BASEURL: https://www-staging.kde.org/
HUGO_ADDIONAL_ARGS: "--buildFuture --buildDrafts"
# Prevent branch pipelines if an MR is open on the branch.
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS
when: never
# Allow merge request pipelines.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# Build tags and branches too
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH
Edited by Julius Künzel