.gitlab-ci.yml 667 Bytes
Newer Older
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
1
2
image: haskell:latest

Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
3
4
5
variables:
  STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"

Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
6
7
before_script:
  - apt-get update && apt-get install xz-utils make
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
8
  - export PATH=$HOME/.local/bin:$PATH
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
9
10
11
12
13
14
15
  - cd src
  - stack setup
  - stack install --only-dependencies
  - stack build

build:
  cache:
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
16
    key: "$CI_BUILD_NAME"
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
17
    paths:
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
18
      - .stack-root/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
19
      - src/.stack-work/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
20
      - src/_cache/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
21
22
23
24
25
26
27
  script:
    - stack exec site build
  except:
    - master

pages:
  cache:
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
28
    key: "$CI_BUILD_NAME"
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
29
    paths:
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
30
      - .stack-root/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
31
      - src/.stack-work/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
32
      - src/_cache/
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
33
34
35
36
  script:
    - stack exec site build
  artifacts:
    paths:
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
37
      - public
Tomáš Zemanovič's avatar
Tomáš Zemanovič committed
38
39
  only:
    - master