From 2e908f655f5934e3fb67580683aed329bf266def Mon Sep 17 00:00:00 2001 From: Samuel Colvin Date: Fri, 4 Sep 2026 12:06:45 +0100 Subject: [PATCH] Trigger unified-docs deployment on every push to main unified-docs pins httpx2 to the main branch, so docs should be redeployed whenever main changes rather than only on tag pushes. --- .github/workflows/main.yml | 25 +++++++++++++++++++++++++ .github/workflows/publish.yml | 25 ------------------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2c64c49c..d03ecf99 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,3 +53,28 @@ jobs: uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0 with: jobs: ${{ toJSON(needs) }} + + deploy-docs: + needs: [check] + if: success() && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + + steps: + - name: Generate app token + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 + id: app-token + with: + app-id: ${{ vars.DOCS_APP_ID }} + private-key: ${{ secrets.DOCS_APP_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: unified-docs + permission-contents: write + + - name: Trigger unified-docs deployment + env: + GH_TOKEN: ${{ steps.app-token.outputs.token }} + run: | + gh api repos/pydantic/unified-docs/dispatches \ + --method POST \ + -f event_type=docs-update \ + -f "client_payload[source]=pydantic/httpx2@${{ github.sha }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 84de8773..9431674b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -65,28 +65,3 @@ jobs: - name: Publish distributions to PyPI run: uv publish --trusted-publishing always dist/* - - deploy-docs: - runs-on: ubuntu-latest - needs: build - - steps: - - name: Generate app token - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 - id: app-token - with: - app-id: ${{ vars.DOCS_APP_ID }} - private-key: ${{ secrets.DOCS_APP_PRIVATE_KEY }} - owner: ${{ github.repository_owner }} - repositories: unified-docs - permission-contents: write - - - name: Trigger unified-docs deployment - env: - GH_TOKEN: ${{ steps.app-token.outputs.token }} - run: | - gh api repos/pydantic/unified-docs/dispatches \ - --method POST \ - -f event_type=docs-update \ - -f "client_payload[source]=pydantic/httpx2@${{ github.sha }}" -