.gitlab-ci.yml 672 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# This file is a template, and might need editing before it works on your project.
# Template project: https://gitlab.com/pages/jekyll
# Docs: https://docs.gitlab.com/ee/pages/
image: ruby:2.6

variables:
  JEKYLL_ENV: production
  LC_ALL: C.UTF-8

before_script:
  - gem install bundler
  - bundle install

test:
  stage: test
Janita Lillevik Røyseth's avatar
Janita Lillevik Røyseth committed
16
  script:
17
    - bundle exec jekyll build -d test
18
19
  artifacts:
    paths:
20
21
22
23
      - test
  except:
    variables:
      - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Janita Lillevik Røyseth's avatar
Janita Lillevik Røyseth committed
24

25
pages:
Janita Lillevik Røyseth's avatar
Janita Lillevik Røyseth committed
26
27
  stage: deploy
  script:
28
    - bundle exec jekyll build -d public
29
30
  artifacts:
    paths:
31
      - public
32
  only:
33
34
    variables:
      - $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH