.gitlab-ci-mkdocs.yml 975 Bytes
Newer Older
Lukas Wiest's avatar
Lukas Wiest committed
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
42
43
44
45
46
47
48

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

cache:
  paths:
    - .cache/pip
    - venv/

mkdocs:compile:
  stage: compile
  image: python:3.8
  tags:
    - docker
  before_script:
    - pip install virtualenv
    - virtualenv venv
    - source venv/bin/activate
  script:
    - pip install -r requirements.txt -U
    - mkdocs build --strict
  only:
    changes:
      - docs/**/*
      - mkdocs.yml
  artifacts:
    expire_in: 3h
    paths:
      - site/

mkdocs:bundle:
  stage: deploy
  image: alpine
  tags:
    - docker
  script:
    - tar c -zvf documentation.tar.gz site
  needs:
    - mkdocs:compile
  only:
    changes:
      - docs/**/*
      - mkdocs.yml
  artifacts:
    expire_in: 3 days
    paths:
      - ./*.tar.gz

49
pages:
Lukas Wiest's avatar
Lukas Wiest committed
50
51
  stage: deploy
  tags:
52
    - docker
Lukas Wiest's avatar
Lukas Wiest committed
53
  script:
54
    - mv site public/
Lukas Wiest's avatar
Lukas Wiest committed
55
56
57
58
  needs:
    - mkdocs:compile
  only:
    refs:
Lukas Wiest's avatar
Lukas Wiest committed
59
      - master
Lukas Wiest's avatar
Lukas Wiest committed
60
61
62
    changes:
      - docs/**/*
      - mkdocs.yml
63
64
65
  artifacts:
    paths:
      - public