Skip to content

Documentation Build

Documentation Build #9

Workflow file for this run

name: Documentation Build
on:
workflow_dispatch: # Allow manual triggering
workflow_call: # Allow calling from other workflows
env:
NAMESPACE: paloaltonetworks
COLLECTION_NAME: panos
permissions:
contents: write
jobs:
docs:
name: Build Documentation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: discover Python version
id: pyversion
uses: ./.github/actions/discover_python_version
- name: Setup Python
uses: actions/setup-python@b64ffcaf5b410884ad320a9cfac8866006a109aa # v4
with:
python-version: ${{ steps.pyversion.outputs.pyversion }}
- name: Install Poetry
uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8
with:
poetry-version: "1.8.5"
- name: Add ansible-core
run: poetry add ansible-core^2.16
- name: Install dependencies
run: poetry install
- name: Build the collection
run: poetry run ansible-galaxy collection build
- name: Install built collection
run: poetry run ansible-galaxy collection install *.tar.gz
- name: Generate documentation
run: poetry run make docs
- name: Remove .doctrees directory
run: |
rm -rf docs/html/.doctrees
shell: bash
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@a1ea191d508feb8485aceba848389d49f80ca2dc # v4.4.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs/html
clean: true