image: registry.gitlab.com/pages/hugo/hugo_extended:latest

default:
  before_script:
    - apk add --update --no-cache git go nodejs npm
    - hugo mod tidy
    - hugo mod npm pack
    - npm install 

test:
  script:
    - hugo
  rules:
    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH

pages:
  script:
    - hugo
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH

