.gitlab-ci.yml 562 Bytes
Newer Older
GitLab's avatar
GitLab committed
1
# requiring the environment of NodeJS 10
Baptiste Dauphin's avatar
Baptiste Dauphin committed
2
image: node:10
GitLab's avatar
GitLab committed
3

Baptiste Dauphin's avatar
Baptiste Dauphin committed
4
before_script:
Baptiste Dauphin's avatar
Baptiste Dauphin committed
5 6 7
  - npm install gitbook-cli -g
  - gitbook fetch 3.2.3
  - gitbook install
Baptiste Dauphin's avatar
Baptiste Dauphin committed
8

GitLab's avatar
GitLab committed
9 10 11
test:
  stage: test
  script:
Baptiste Dauphin's avatar
Baptiste Dauphin committed
12
    - gitbook build . public
13
  rules:
14 15
    - if: $CI_COMMIT_BRANCH != "master"
      changes:
16
      - docs/**/*
Baptiste Dauphin's avatar
Baptiste Dauphin committed
17
      - .git*
18
      - book.json
GitLab's avatar
GitLab committed
19 20 21 22
    
pages:
  stage: deploy
  script:
Baptiste Dauphin's avatar
Baptiste Dauphin committed
23
    - gitbook build . public
GitLab's avatar
GitLab committed
24 25 26 27
  artifacts:
    paths:
      - public
    expire_in: 1 week
28
  rules:
29 30 31
    - if: $CI_COMMIT_BRANCH == "master"
      changes:
      - docs/**/*
Baptiste Dauphin's avatar
Baptiste Dauphin committed
32
      - .git*
33
      - book.json