Commit 2c2bb2b0 authored by Federico Falconieri's avatar Federico Falconieri
Browse files

Merge branch 'rhtenhove-main-patch-28549' into 'main'

fix: hugo image and combine to single job

See merge request just-ci/templates!97
parents 71e21859 45d3d2ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
# CI of ci/templates itself

variables:
  SCHEDULE_PIPELINE_PROJECT_IDS: 30771297 30771293 30771284 30771254 30771239
  SCHEDULE_PIPELINE_PROJECT_IDS:
    30771297 30771293 30771284 30771254 30771239 30933363
  GITLAB_RECOMMENDED_AUTO_FIX: "true"
  RELEASE_CHANGELOG: "false"

+10 −17
Original line number Diff line number Diff line
@@ -3,14 +3,16 @@
# The job name must be pages for it to work.

pages:
  image: registry.gitlab.com/just-ci/images/hugo:latest
  # Add a before script to add an external theme, for example:
  # before_script:
  #   - git clone https://github.com/matcornic/hugo-theme-learn.git themes/hugo-theme-learn
  image:
    name: registry.gitlab.com/just-ci/images/hugo:latest
    entrypoint: [""]
  variables:
    MINIFY: "false"
    EXTRA_ARGS: ""
  stage: build
  # Add a before script to add an external theme, for example:
  # before_script:
  #   - git clone https://github.com/matcornic/hugo-theme-learn.git themes/hugo-theme-learn
  script:
    - |
      if [ ${MINIFY} = "true" ]; then
@@ -24,20 +26,11 @@ pages:
      if [ ! "${CI_PROJECT_DIR}" = "${PWD}" ]; then
        mv public "${CI_PROJECT_DIR}/public"
      fi
    - |
      if [ "${CI_COMMIT_BRANCH}" = "${CI_DEFAULT_BRANCH}" ]; then
        echo "[!] When browing the test job artifacts you may not see the full final result when opening an HTML file, as the built site may reference absolute or canonified URLs."
      fi
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

pages:test:
  extends: pages
  stage: test
  after_script:
    - echo "[!] When browing the test job artifacts you may not see the full
      final result when opening an HTML file, as the built site may reference
      absolute or canonified URLs."
  artifacts:
    when: always
  rules:
    - if: "$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH"