-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
39 lines (35 loc) · 1.1 KB
/
.gitlab-ci.yml
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
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "web" # run for manually started pipelines from -/pipelines/new
- if: $CI_MERGE_REQUEST_IID # run for all the types of merge request pipelines
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH # run for the default branch (not for tags)
stages:
- create
- check
- upload
create_doc:
stage: create
image: python:3.8-buster
script:
- pip install tox
- tox -e docs
artifacts:
paths:
- build/html
check_version:
stage: check
image: python:3.8-buster
rules:
- if: $CI_MERGE_REQUEST_IID
script:
- pip install -i https://bbpteam.epfl.ch/repository/devpi/simple --upgrade docs-internal-upload
- docs-internal-upload --docs-path build/html/ --duplicate-version-error --dry-run
upload_doc:
stage: upload
image: python:3.8-buster
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "web"
script:
- pip install -i https://bbpteam.epfl.ch/repository/devpi/simple --upgrade docs-internal-upload
- docs-internal-upload --docs-path build/html/ --duplicate-version-error