-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
47 lines (43 loc) · 969 Bytes
/
.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
stages:
- test
- deploy
workflow:
rules:
- if: >
($CI_COMMIT_REF_NAME == "main"
|| $CI_COMMIT_REF_NAME == "gh-pages")
when: always
- if: '$CI_PIPELINE_SOURCE == "web"'
when: always
#run-tests:
# stage: test
# image: python:3.10
# before_script:
# - pip install pdm>=2.5.3 requests==2.29.0
# - pdm install -G test
# script:
# - pdm run pytest --verbose
pip-package:
stage: deploy
image: python:3.10
rules:
- if: $CI_COMMIT_TAG
before_script:
- pip install pdm>=2.5.3 requests==2.29.0
script:
- pdm config repository.pypi.username "__token__"
- pdm config repository.pypi.password "${PYPI_API_TOKEN}"
- pdm publish
pages:
stage: deploy
image: python:3.10
before_script:
- pip install pdm>=2.5.3 requests==2.29.0
- pdm install -G docs
script:
- cd docs
- pdm run mkdocs build --site-dir public
- mv public ../public
artifacts:
paths:
- public