From a4c330206e4413bb28dfbf69d58a956b3275e52e Mon Sep 17 00:00:00 2001 From: Sam Daniel Thangarajan Date: Wed, 14 Jan 2026 22:43:34 +0100 Subject: [PATCH] explicit build job for doc --- .github/workflows/wf-push.yml | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wf-push.yml b/.github/workflows/wf-push.yml index 9023a3d..524379a 100644 --- a/.github/workflows/wf-push.yml +++ b/.github/workflows/wf-push.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11", "3.12", "3.13"] + python-version: ["3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3 @@ -41,15 +41,19 @@ jobs: with: name: build-artifacts-${{ matrix.python-version }} path: | - dist/ + dist deploy-docs: name: Deploy documentation 📚 to GitHub Pages - if: ${{ github.event_name == 'push' && github.ref == 'refs/tags' }} + if: ${{ github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/magic-test-deploy') }} needs: - build runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.12"] environment: name: github-pages @@ -62,10 +66,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.12 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: - python-version: 3.12 + python-version: ${{ matrix.python-version }} - name: Upgrade pip run: python -m pip install --upgrade pip @@ -73,7 +77,7 @@ jobs: - name: Install Tox run: pip install tox - - name: Run Doc + - name: Run lint run: tox -e doc - name: Deploy to GitHub Pages @@ -83,10 +87,11 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html force_orphan: true + keep_files: true publish-to-testpypi: name: Publish Python 🐍 distribution 📦 to TestPyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' needs: - build runs-on: ubuntu-latest @@ -99,17 +104,22 @@ jobs: id-token: write steps: - - name: Download all the dists + - uses: actions/checkout@v3 + + - name: Download dist uses: actions/download-artifact@v6 with: name: build-artifacts-3.12 - path: ./ + path: . + - name: list all files run: ls -lR + - name: Publish distribution 📦 to TestPyPI uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ + verbose: true publish-to-pypi: name: >- @@ -118,18 +128,25 @@ jobs: needs: - publish-to-testpypi # only publish to PyPI after TestPyPI publishing runs-on: ubuntu-latest + environment: name: pypi url: https://pypi.org/p/nasdaq-protocols + permissions: id-token: write + steps: - name: Download all the dists uses: actions/download-artifact@v6 with: name: build-artifacts-3.12 path: ./ + - name: list all files run: ls -lR + - name: Publish distribution 📦 to PyPI uses: pypa/gh-action-pypi-publish@release/v1 + with: + verbose: true