-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (41 loc) · 1.3 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
45
46
stages:
- test
- build-and-deploy
.run_on_dockerhost: &run_on_dockerhost
tags:
- docker20
before_script:
- python3 ams2rst_script/ConvertAMS2RST.py AimmsXLLibrary.ams
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
image: gitlab.aimms.com:5050/other/dockerdev/documentation:latest
linkcheck:
<<: *run_on_dockerhost
stage: test
script:
- python3 -msphinx -W -b linkcheck . _build/linkcheck
retry: 1
spellcheck:
<<: *run_on_dockerhost
stage: test
script:
- python3 -msphinx -W --keep-going -b spelling . _build/spelling
build:
<<: *run_on_dockerhost
stage: test
script:
- python3 -msphinx -W --keep-going -b html . _build/html
deploy:
<<: *run_on_dockerhost
stage: build-and-deploy
rules:
- if: $CI_COMMIT_BRANCH == "master"
when: on_success
- when: never
script:
- python3 -msphinx -b html . _build/html
- python3 -msphinx.ext.intersphinx _build/html/objects.inv > _build/html/help_index_aimmsxllibrary.txt
- cp -r _build/html aimmsxllibrary
- az storage copy -s 'aimmsxllibrary' --recursive --destination-container '$web' -- --overwrite=true --as-subdir=true
- bash load_ssh_key_for_deploy.sh
- rsync -rt _build/html/ support@data.aimms.com:/home/aimms/www/documentation.aimms.com/aimmsxllibrary/
retry: 1