.gitlab-ci.yml 1.1 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
#
# 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.
# - To change the theme, see
#   https://gitlab.com/pages/hugo/-/blob/main/README.md#use-a-custom-theme.
#
image: registry.gitlab.com/pages/hugo/hugo_extended:latest
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
13

14
# Set this if you intend to use Git submodules
15
16
variables:
  GIT_SUBMODULE_STRATEGY: recursive
17
  HUGO_ENV: production
18

19
20
21
22
default:
  before_script:
    - apk add --update --no-cache git go
    - git submodule update --init --recursive
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
23
    - hugo mod init gitlab.com/pages/hugo
24
    - hugo mod get -u github.com/theNewDynamic/gohugo-theme-ananke
25

26
27
test:
  script:
28
    - hugo
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
29
30
  rules:
    - if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
31

Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
32
33
pages:
  script:
34
    - hugo
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
35
36
  artifacts:
    paths:
37
      - public
Achilleas Pipinellis's avatar
Achilleas Pipinellis committed
38
39
  rules:
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH