-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
51 lines (47 loc) · 1.11 KB
/
.gitlab-ci.yml
File metadata and controls
51 lines (47 loc) · 1.11 KB
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
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
- if: '$CI_COMMIT_TAG'
# also run the pipeline if only a tag is pushed
when: always
- when: never
#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:
# only run this job when a new tag is pushed
- if: $CI_COMMIT_TAG
when: always
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