summaryrefslogtreecommitdiff
path: root/lib/gitlab/ci/templates/Pages/Zola.gitlab-ci.yml
blob: 0ce7bface669a885c2c1804ade4215b21e291f15 (plain)
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
# To contribute improvements to CI/CD templates, please follow the Development guide at:
# https://docs.gitlab.com/ee/development/cicd/templates.html
# This specific template is located at:
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Pages/Zola.gitlab-ci.yml

---
# From: https://www.getzola.org/documentation/deployment/gitlab-pages/
# Source template is slightly modified to be self-contained

pages:
  image: alpine:latest
  variables:
    # This variable will ensure that the CI runner pulls in your theme from the submodule
    GIT_SUBMODULE_STRATEGY: recursive
  before_script:
    # Install the zola package from the alpine community repositories
    - apk add --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ zola
  script:
    # Execute zola build
    - zola build --base-url "$CI_PAGES_URL"
  artifacts:
    paths:
      # Path of our artifacts
      - public
  # This config will only publish changes that are pushed on the default branch
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
  environment: production