Files
kubevirt.core/.github/workflows/docs.yml
Felix Matouschek b719edf5da .github: Update tested Ansible and Python versions
Use Python 3.9 - 3.12 and Ansible 2.14 - 2.16, devel and milestone to run
tests of the collection. Use the latest stable python version in test setups
where sensible. Instead of using the integration.yml workflog from main
use it from the same commit as the test runs instead.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2024-02-28 09:14:23 +01:00

67 lines
1.9 KiB
YAML

---
name: Documentation
on:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
env:
COLORTERM: 'yes'
TERM: 'xterm-256color'
PYTEST_ADDOPTS: '--color=yes'
jobs:
docs:
runs-on: ubuntu-latest
if: github.repository == 'kubevirt/kubevirt.core'
permissions:
actions: write
checks: write
contents: write
deployments: write
packages: write
pages: write
steps:
- name: Check out code
uses: actions/checkout@v4
with:
path: ansible_collections/kubevirt/core
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x
cache: pip
- name: Install doc dependencies
run: |
python -m pip install --upgrade pip
pip install -r ansible_collections/kubevirt/core/docs/requirements.txt
pip install -r ansible_collections/kubevirt/core/requirements.txt
ansible-galaxy collection install -r ansible_collections/kubevirt/core/requirements.yml -p /home/runner/.ansible/collections --force-with-deps
sudo apt install -y sed hub
- name: Create default collection path
run: |
mkdir -p /home/runner/.ansible/
cp -rp ${GITHUB_WORKSPACE}/ansible_collections /home/runner/.ansible/collections/
- name: Create changelog and documentation
uses: ansible-middleware/collection-docs-action@main
with:
collection_fqcn: kubevirt.core
collection_repo: kubevirt/kubevirt.core
dependencies: false
commit_changelog: false
commit_ghpages: true
changelog_release: false
generate_docs: true
path: /home/runner/.ansible/collections/ansible_collections/kubevirt/core
token: ${{ secrets.GITHUB_TOKEN }}
bot_email: kubevirtbot@redhat.com
bot_account: kubevirt-bot