@@ -3,6 +3,7 @@ name: build
3
3
on :
4
4
push :
5
5
pull_request :
6
+ workflow_call :
6
7
7
8
jobs :
8
9
build :
@@ -19,15 +20,13 @@ jobs:
19
20
runs-on : ${{ matrix.os }}
20
21
21
22
steps :
22
- - name : Check out repository
23
- uses : actions/checkout@v4
24
-
25
- - name : Set up Python
23
+ - uses : actions/checkout@v4
24
+ - name : Set up Python ${{ matrix.version }}
26
25
uses : actions/setup-python@v5
27
26
with :
28
27
python-version : ${{ matrix.version }}
29
28
30
- - name : Install package
29
+ - name : Install packages
31
30
run : pip install .
32
31
33
32
- name : Run tests
44
43
uses : actions/upload-pages-artifact@v3
45
44
if : matrix.os == 'ubuntu-latest' && matrix.version == '3.12'
46
45
with :
47
- name : docs
48
46
path : html/
49
47
50
48
- name : Install pypa/build
60
58
name : python-package-distributions
61
59
path : dist/
62
60
63
- deploy-docs :
64
- name : Deploy Docs to GitHub Pages
65
- if : ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' }}
66
- runs-on : ubuntu-latest
67
- needs : [build]
68
- permissions :
69
- pages : write # to deploy to Pages
70
- id-token : write # to verify the deployment originates from an appropriate source
71
- environment :
72
- name : github-pages
73
- url : ${{ steps.deployment.outputs.page_url }}
74
-
75
- steps :
76
- - name : Deploy to GitHub Pages
77
- id : deployment
78
- uses : actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action
79
- with :
80
- artifact_name : docs
81
-
82
61
deploy-testpypi :
83
62
name : Deploy Distribution to Test PyPI
84
63
if : false # Currently disabled
0 commit comments