File tree Expand file tree Collapse file tree 4 files changed +36
-30
lines changed Expand file tree Collapse file tree 4 files changed +36
-30
lines changed Original file line number Diff line number Diff line change 4
4
workflow_dispatch :
5
5
push :
6
6
branches : ["master"]
7
- permissions :
8
- contents : read
9
- pages : write
10
- id-token : write
11
- concurrency :
12
- group : " pages"
13
- cancel-in-progress : false
14
- env :
15
- BUILD_PATH : " ."
16
7
jobs :
17
8
build :
18
- name : Build
19
9
runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : read
12
+ env :
13
+ BUILD_PATH : .
14
+ PIP_DISABLE_PIP_VERSION_CHECK : 1
20
15
steps :
21
16
# checkout repository
22
17
- name : Checkout repository
28
23
python-version : " 3.11"
29
24
# building
30
25
- name : Install 'documentation' dependencies
31
- run : pip install -r python/requirements.mkdocs.txt
26
+ run : |
27
+ pip install .
28
+ pip install -r python/requirements.mkdocs.txt
32
29
- name : Build documentation
33
30
run : python src/export docs
34
31
# set up Pages
@@ -40,13 +37,17 @@ jobs:
40
37
with :
41
38
path : ${{ env.BUILD_PATH }}/site
42
39
deploy :
43
- runs-on : ubuntu-latest
44
40
needs : build
41
+ runs-on : ubuntu-latest
42
+ permissions :
43
+ pages : write
44
+ id-token : write
45
45
environment :
46
46
name : github-pages
47
47
url : ${{ steps.deployment.outputs.page_url }}
48
48
# deploy documentation
49
49
name : Deploy
50
50
steps :
51
51
- name : Deploy to GitHub Pages
52
- uses : actions/deploy-pages@v1
52
+ id : deployment
53
+ uses : actions/deploy-pages@v2
Original file line number Diff line number Diff line change 4
4
workflow_dispatch :
5
5
release :
6
6
types : [published]
7
- permissions :
8
- contents : read
9
- env :
10
- BUILD_PATH : " ."
11
7
jobs :
12
8
build :
13
9
runs-on : ubuntu-latest
10
+ permissions :
11
+ contents : read
12
+ env :
13
+ BUILD_PATH : .
14
+ PIP_DISABLE_PIP_VERSION_CHECK : 1
14
15
steps :
15
16
# checkout repository
16
17
- name : Checkout repository
@@ -24,27 +25,27 @@ jobs:
24
25
- name : Install dependencies
25
26
run : |
26
27
python -m venv .venv
27
- ./.venv/Scripts /python -m pip install --upgrade pip
28
- ./.venv/Scripts /pip install .
29
- ./.venv/Scripts /pip install -r python/requirements.sphinx.txt
30
- ./.venv/Scripts /pip install build
28
+ ./.venv/bin /python -m pip install --upgrade pip
29
+ ./.venv/bin /pip install .
30
+ ./.venv/bin /pip install -r python/requirements.sphinx.txt
31
+ ./.venv/bin /pip install build
31
32
# build package
32
33
- name : Build package
33
- run : ./.venv/Scripts/python src/export package
34
+ run : |
35
+ . ./.venv/bin/activate
36
+ python src/export package
37
+ deactivate
34
38
# upload package as artifact
35
39
- name : Upload artifact
36
40
uses : actions/upload-pages-artifact@v1
37
41
with :
38
42
path : ${{ env.BUILD_PATH }}/dist
39
43
publish :
40
- runs-on : ubuntu-latest
41
44
needs : build
45
+ runs-on : ubuntu-latest
46
+ permissions :
47
+ id-token : write
42
48
steps :
43
- # download artifact
44
- - name : Download artifact
45
- uses : actions/download-artifact@v3
46
- with :
47
- path : ${{ env.BUILD_PATH }}/dist
48
49
# publish package
49
50
- name : Publish to PyPI
50
51
uses : pypa/gh-action-pypi-publish@release/v1
Original file line number Diff line number Diff line change 9
9
jobs :
10
10
tooling :
11
11
runs-on : ubuntu-latest
12
+ env :
13
+ PIP_DISABLE_PIP_VERSION_CHECK : 1
12
14
steps :
13
15
# checkout repository
14
16
- name : Checkout repository
20
22
python-version : " 3.8"
21
23
# tooling
22
24
- name : Install 'tooling' dependencies
23
- run : pip install -r python/requirements.tooling.txt
25
+ run : |
26
+ pip install .
27
+ pip install -r python/requirements.tooling.txt
24
28
- name : Tooling
25
29
run : |
26
30
black .
Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ def package(source: Path):
149
149
generate_documentation (source , only_rst_man = True )
150
150
# print()
151
151
if getenv ("CI" , "false" ) == "true" :
152
- process = Popen (("./venv/Scripts /python" , "-m" , "build" ), shell = False ) # nosec
152
+ process = Popen (("./. venv/bin /python" , "-m" , "build" ), shell = False ) # nosec
153
153
else :
154
154
process = Popen (("pdm" , "build" ), shell = False ) # nosec
155
155
process .communicate ()
You can’t perform that action at this time.
0 commit comments