forked from mautrix/python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (42 loc) · 1.01 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
40
41
42
43
44
build docs builder:
stage: build
image: docker:stable
tags:
- amd64
only:
refs:
- master
changes:
- docs/Dockerfile
- docs/requirements.txt
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- cd docs
- docker build --tag $CI_REGISTRY_IMAGE/doc-builder:latest .
- docker push $CI_REGISTRY_IMAGE/doc-builder:latest
- docker rmi $CI_REGISTRY_IMAGE/doc-builder:latest
build docs:
stage: deploy
image: dock.mau.dev/mautrix/python/doc-builder
tags:
- webdeploy
only:
- master
script:
- cd docs
- make html
- mkdir -p /srv/web/docs.mau.fi/python/latest/
- rsync -rcthvl --delete _build/html/ /srv/web/docs.mau.fi/python/latest/
build tag docs:
stage: deploy
image: dock.mau.dev/mautrix/python/doc-builder
tags:
- webdeploy
only:
- tags
script:
- cd docs
- make html
- mkdir -p /srv/web/docs.mau.fi/python/$CI_COMMIT_TAG/
- rsync -rcthvl --delete _build/html/ /srv/web/docs.mau.fi/python/$CI_COMMIT_TAG/