Skip to content

Commit cf871ce

Browse files
author
Sam Daniel Thangarajan
committed
explicit build job for doc
1 parent 9b37567 commit cf871ce

File tree

1 file changed

+26
-9
lines changed

1 file changed

+26
-9
lines changed

.github/workflows/wf-push.yml

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
python-version: ["3.10", "3.11", "3.12", "3.13"]
11+
python-version: [3.12"]
1212

1313
steps:
1414
- uses: actions/checkout@v3
@@ -41,15 +41,19 @@ jobs:
4141
with:
4242
name: build-artifacts-${{ matrix.python-version }}
4343
path: |
44-
dist/
44+
dist
4545
4646
4747
deploy-docs:
4848
name: Deploy documentation 📚 to GitHub Pages
49-
if: ${{ github.event_name == 'push' && github.ref == 'refs/tags' }}
49+
if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/magic-test-deploy') }}
5050
needs:
5151
- build
5252
runs-on: ubuntu-latest
53+
strategy:
54+
fail-fast: false
55+
matrix:
56+
python-version: [3.12"]
5357

5458
environment:
5559
name: github-pages
@@ -62,18 +66,18 @@ jobs:
6266
steps:
6367
- uses: actions/checkout@v3
6468

65-
- name: Set up Python 3.12
69+
- name: Set up Python ${{ matrix.python-version }}
6670
uses: actions/setup-python@v3
6771
with:
68-
python-version: 3.12
72+
python-version: ${{ matrix.python-version }}
6973

7074
- name: Upgrade pip
7175
run: python -m pip install --upgrade pip
7276

7377
- name: Install Tox
7478
run: pip install tox
7579

76-
- name: Run Doc
80+
- name: Run lint
7781
run: tox -e doc
7882

7983
- name: Deploy to GitHub Pages
@@ -83,10 +87,11 @@ jobs:
8387
github_token: ${{ secrets.GITHUB_TOKEN }}
8488
publish_dir: docs/_build/html
8589
force_orphan: true
90+
keep_files: true
8691

8792
publish-to-testpypi:
8893
name: Publish Python 🐍 distribution 📦 to TestPyPI
89-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
94+
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main'
9095
needs:
9196
- build
9297
runs-on: ubuntu-latest
@@ -99,17 +104,22 @@ jobs:
99104
id-token: write
100105

101106
steps:
102-
- name: Download all the dists
107+
- uses: actions/checkout@v3
108+
109+
- name: Download dist
103110
uses: actions/download-artifact@v6
104111
with:
105112
name: build-artifacts-3.12
106-
path: ./
113+
path: .
114+
107115
- name: list all files
108116
run: ls -lR
117+
109118
- name: Publish distribution 📦 to TestPyPI
110119
uses: pypa/gh-action-pypi-publish@release/v1
111120
with:
112121
repository-url: https://test.pypi.org/legacy/
122+
verbose: true
113123

114124
publish-to-pypi:
115125
name: >-
@@ -118,18 +128,25 @@ jobs:
118128
needs:
119129
- publish-to-testpypi # only publish to PyPI after TestPyPI publishing
120130
runs-on: ubuntu-latest
131+
121132
environment:
122133
name: pypi
123134
url: https://pypi.org/p/nasdaq-protocols
135+
124136
permissions:
125137
id-token: write
138+
126139
steps:
127140
- name: Download all the dists
128141
uses: actions/download-artifact@v6
129142
with:
130143
name: build-artifacts-3.12
131144
path: ./
145+
132146
- name: list all files
133147
run: ls -lR
148+
134149
- name: Publish distribution 📦 to PyPI
135150
uses: pypa/gh-action-pypi-publish@release/v1
151+
with:
152+
verbose: true

0 commit comments

Comments
 (0)