Skip to content

Add workflow to trigger python-docs-pdf builds on Doc/ changes#39

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/modify-workflow-trigger
Draft

Add workflow to trigger python-docs-pdf builds on Doc/ changes#39
Copilot wants to merge 5 commits intomasterfrom
copilot/modify-workflow-trigger

Conversation

Copy link
Copy Markdown

Copilot AI commented Jan 23, 2026

Automate python-docs-pdf repository builds when documentation is updated in cpython. When commits to main or 3.* branches modify Doc/** paths, trigger the downstream workflow via repository_dispatch.

Changes

  • New workflow .github/workflows/trigger-docs-pdf.yml:

    • Triggers on push to main and 3.* branches with Doc/** path filter
    • Sends repository_dispatch event with cpython_docs_updated type to m-aciek/python-docs-pdf
    • Payload includes branch name, repository, commit SHA, and message
    • Uses jq for JSON construction to prevent injection attacks
  • Documentation .github/workflows/README-trigger-docs-pdf.md:

    • Setup instructions for required DOCS_PDF_TRIGGER_TOKEN secret (PAT with workflow trigger permissions)
    • Configuration needed in target repository to accept dispatch events

Required Setup

This repository: Add DOCS_PDF_TRIGGER_TOKEN secret containing a PAT with repo or public_repo scope.

Target repository (m-aciek/python-docs-pdf): Add repository_dispatch trigger to build.yaml:

on:
  repository_dispatch:
    types: [cpython_docs_updated]

Then reference the branch from the payload:

- uses: actions/checkout@v6
  with:
    repository: python/cpython
    ref: ${{ github.event.client_payload.branch }}
Original prompt

Please modify the workflow files in a way that:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 23, 2026 05:05
Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…d update checkout version

Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Copilot AI changed the title [WIP] Update workflow to trigger on Doc prefix changes Add workflow to trigger python-docs-pdf builds on Doc/ changes Jan 23, 2026
Copilot AI requested a review from m-aciek January 23, 2026 05:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants