-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
41 lines (37 loc) · 1.25 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#
# 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.
# If you don't know what to use, better use the extended version.
# - 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
variables:
HUGO_ENV: production
THEME_URL: "github.com/theNewDynamic/gohugo-theme-ananke"
default:
before_script:
- apk add --update --no-cache git go
- git submodule update --init --recursive
# - hugo mod init gitlab.com/pages/hugo
# - hugo mod get -u github.com/theNewDynamic/gohugo-theme-ananke
# Use everywhere except on the default branch
test:
script:
- hugo --minify
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
# Run only on the default branch
pages:
script:
- hugo --gc --minify
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH