-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
100 lines (91 loc) · 2.47 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Copyright (c) 2023 Forschungszentrum Juelich GmbH.
# This file is part of LLview.
#
# This is an open source software distributed under the GPLv3 license. More information see the LICENSE file at the top level.
#
# Contributions must follow the Contributor License Agreement. More information see the CONTRIBUTING.md file at the top level.
#
# Contributors:
# Filipe Guimarães (Forschungszentrum Juelich GmbH)
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
include:
- local: jureptool/.gitlab-ci.yml
rules:
- changes:
- jureptool/**/* # all files under folder 'jureptool'
- configs/jureptool/**/* # all config files under folder 'configs/jureptool'
stages:
- build
- jureptool_test
- deploy
before_script:
- virtualenv -p `which python3` venv
- source venv/bin/activate
- python3 -V # Print out python version for debugging
# Dependencies:
- pip3 install mkdocs
- pip3 install mkdocs-material
- pip3 install mkdocs-material-extensions
- pip3 install mkdocs-glightbox
- pip3 install mkdocs-git-revision-date-localized-plugin
builddocs:
stage: build
tags:
- remote
variables:
GIT_DEPTH: 0
script:
- cd docs
- rm -rf ./site 2>/dev/null || true
- mkdocs build
artifacts:
paths:
- docs/site
rules:
- changes:
- docs/**/* # all files under folder 'docs'
pages:
stage: deploy
needs:
- builddocs
tags:
- remote
script:
- cd docs
- rm -rf ../public 2>/dev/null || true
- mkdir -p ../public
- cp -r site/* ../public/
artifacts:
paths:
- public
rules:
- changes:
- docs/**/* # all files under folder 'docs'
pages:production:
stage: deploy
needs:
- builddocs
rules:
- if: '$CI_COMMIT_BRANCH == "main"' # Only on the main branch
changes:
- docs/**/* # all files under folder 'docs'
tags:
- remote
script:
- echo "Deploying to production"
- "sshpass -e -P 'passphrase for key' rsync -rlgoDzP --del docs/site/* apps_llview_docu:"
when: manual
environment:
name: production
url: https://apps.fz-juelich.de/jsc/llview/docu/