Allow passing custom SSL contexts to Prefect clients (#19106) #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-generate documentation | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
# Trigger on changes to Python source files | |
- "src/prefect/**/*.py" | |
- "src/integrations/**/*.py" | |
# Trigger on changes to examples | |
- "examples/**/*.py" | |
# Trigger on changes to generation scripts themselves | |
- "scripts/generate_*.py" | |
- "scripts/run_precommit_generation_scripts.py" | |
# Trigger on changes to this workflow | |
- ".github/workflows/auto-generate-docs.yaml" | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
generate-docs: | |
name: Generate documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v5 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Configure Git | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Set up node | |
uses: actions/setup-node@v5 | |
with: | |
node-version-file: ".nvmrc" | |
cache-dependency-path: "**/package-lock.json" | |
- name: Set up uv | |
uses: astral-sh/setup-uv@v7 | |
with: | |
enable-cache: true | |
cache-dependency-glob: "pyproject.toml" | |
- name: Install mdxify | |
run: uv tool install mdxify@latest -U | |
- name: Set up just | |
uses: extractions/setup-just@v3 | |
- name: Generate all docs via just | |
run: just generate-docs | |
- name: Check for changes | |
id: check-changes | |
run: | | |
if git diff --quiet; then | |
echo "No documentation changes detected" | |
echo "has_changes=false" >> $GITHUB_OUTPUT | |
else | |
echo "Documentation changes detected" | |
echo "has_changes=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Print git diff (workflow_dispatch only) | |
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'workflow_dispatch' | |
run: | | |
echo "Documentation changes detected (workflow_dispatch - not creating PR):" | |
git diff --name-status | |
echo "" | |
echo "Full diff:" | |
git diff | |
- name: Create branch and commit changes | |
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'push' | |
run: | | |
BRANCH_NAME="auto-docs-update-$(date +%Y%m%d-%H%M%S)" | |
git checkout -b "$BRANCH_NAME" | |
git add . | |
git commit -m "Auto-update documentation | |
This PR contains automatically generated documentation updates based on recent changes to the main branch. | |
Generated by GitHub Actions workflow: auto-generate-docs.yaml" | |
git push origin "$BRANCH_NAME" | |
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | |
- name: Create pull request | |
if: steps.check-changes.outputs.has_changes == 'true' && github.event_name == 'push' | |
run: | | |
gh pr create \ | |
--title "Auto-update documentation" \ | |
--body "## Summary | |
This PR contains automatically generated documentation updates based on recent changes to the main branch. | |
### Changes included: | |
- OpenAPI documentation updates | |
- Settings schema updates | |
- Settings reference updates | |
- API reference updates | |
- Example pages updates | |
### Files changed: | |
\`\`\` | |
$(git diff --name-status origin/main...HEAD) | |
\`\`\` | |
--- | |
*This PR was automatically generated by the [auto-generate-docs workflow](.github/workflows/auto-generate-docs.yaml)*" \ | |
--base main \ | |
--label "auto-generated" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |