Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #4

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #4

name: PyDocs Preview
on:
pull_request_target:
branches:
- master
jobs:
build:
if: github.repository_owner == 'PaloAltoNetworks'
name: Generate docs
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipx
python -m pip install editfrontmatter
pipx install 'pydoc-markdown>=4.0.0,<5.0.0'
- name: Generate markdown docs
run: |
pydoc-markdown -vv
- name: Upload markdown artifacts
uses: actions/upload-artifact@v2
with:
name: docs-dir
path: docs/
pull:
name: Open pull request
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout docs repository
uses: actions/checkout@v2
with:
repository: 'PaloAltoNetworks/cortex.pan.dev'
- name: Download markdown artifacts
uses: actions/[email protected]
with:
name: docs-dir
path: docs/
- name: Commit changes
id: commit
run: |
git config --global user.email "[email protected]"
git config --global user.name "Steven Serrata"
git add .
(git diff --exit-code || git diff --exit-code --cached) || git commit -m "update pydocs"
git status
- name: Create Pull Request
id: pydocs
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.PYDOC_TOKEN }}
commit-message: Update pydocs
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
delete-branch: true
title: '🚫 [PyDocs Preview] Preview python library docs'
labels: |
don't merge
body: |
Update pydocs
- Docs generated with `pydoc-markdown`
> **For preview/review purposes only**, please close this PR and delete branch when done. A new PR
will be opened (that can be merged) when upstream changes are merged to main branch.