Skip to content

Mettre à jour Hugo

Pour documentation#27 (closed), il faut mettre à jour l'image dans le registre de conteneur pour la dernière version de Hugo.

Idées :

Dockerfile :

FROM registry.gitlab.com/pages/hugo/hugo_extended:${HUGO_VERSION}

.gitlab-ci.yml :

variables:
#...
  HUGO_VERSION:
    description: "Select the HUGO version. Valid options are: 'canary', 'staging', 'production', or a stable branch of your choice."
    value: "0.146.5"
build-image:
#...
  script:
    - docker build --build-arg HUGO_VERSION=$HUGO_VERSION -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:$HUGO_VERSION .
    - docker push $CI_REGISTRY_IMAGE --all-tags