From 658581e147b5a78bf42b8ad2fc2d376a74003ec9 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 30 Mar 2025 09:53:34 -0300 Subject: [PATCH 1/2] Add test stage to CI - Adds a test stage using a Hugo image. - Runs `hugo version` and `hugo --minify` in the test stage. - Restricts test execution to merge requests and master branches. --- .gitlab-ci.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cc33d9f..bc17860 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,19 @@ image: alpine:latest +stages: + - test + - deploy + +test_build: + stage: test + image: klakegg/hugo:0.111.3-ext-alpine + script: + - hugo version + - hugo --minify + only: + - merge_requests + - master + deploy: stage: deploy before_script: From ef2075668ae10740488e2f8f88a8ccf4f82d859f Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sun, 30 Mar 2025 09:55:55 -0300 Subject: [PATCH 2/2] Update Hugo CI image version. - Use a more specific CI image version. - Pin the image to include CI tooling. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bc17860..d110137 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,7 @@ stages: test_build: stage: test - image: klakegg/hugo:0.111.3-ext-alpine + image: klakegg/hugo:0.111.3-ext-alpine-ci script: - hugo version - hugo --minify