From b81a43507931e191a59d46c51d4f3ab0dae2e7c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arnaud=20Gu=C3=A9ras?= Date: Mon, 16 Sep 2024 06:31:02 +0200 Subject: [PATCH] add content to gitlab.yaml MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Arnaud Guéras --- .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e69de29..b57ed00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -0,0 +1,46 @@ +# This file is a template, and might need editing before it works on your project. +# To contribute improvements to CI/CD templates, please follow the Development guide at: +# https://docs.gitlab.com/ee/development/cicd/templates.html +# This specific template is located at: +# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/Hugo.gitlab-ci.yml + +--- +# +# Before using this .gitlab-ci.yml: +# +# - This example uses the latest Docker image, but you might want to use the +# exact version to avoid any broken pipelines. +# All available Hugo versions are listed under https://gitlab.com/pages/hugo/container_registry. +# - Read about the difference between hugo and hugo_extended +# https://gitlab.com/pages/hugo/-/blob/main/README.md#hugo-vs-hugo_extended. +# If you don't know what to use, better use the extended version. +# - To change the theme, see +# https://gitlab.com/pages/hugo/-/blob/main/README.md#use-a-custom-theme. +# +default: + image: "${CI_TEMPLATE_REGISTRY_HOST}/pages/hugo/hugo_extended:0.132.2" + +variables: + GIT_SUBMODULE_STRATEGY: recursive + HUGO_ENV: production + + #before_script: + # - apk add --no-cache go curl bash nodejs + # ## Uncomment the following if you use PostCSS. See https://gohugo.io/hugo-pipes/postcss/ + # # - npm install postcss postcss-cli autoprefixer + +test: + script: + - hugo + rules: + - if: $CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH + +deploy: + script: + - hugo + - tar caf site.tar.gz public + artifacts: + paths: + - site.tar.gz + rules: + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH -- 2.39.5