mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-05-06 13:22:38 +00:00
67
.github/workflows/docs.yml
vendored
Normal file
67
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,67 @@
|
||||
---
|
||||
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/kubernetes.kubevirt'
|
||||
permissions:
|
||||
actions: write
|
||||
checks: write
|
||||
contents: write
|
||||
deployments: write
|
||||
packages: write
|
||||
pages: write
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
path: ansible_collections/kubernetes/kubevirt
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.9
|
||||
cache: 'pip'
|
||||
|
||||
- name: Install doc dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r ansible_collections/kubernetes/kubevirt/docs/requirements.txt
|
||||
pip install -r ansible_collections/kubernetes/kubevirt/requirements.txt
|
||||
ansible-galaxy collection install -r ansible_collections/kubernetes/kubevirt/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 /home/runner/work/kubevirt/kubevirt/ansible_collections /home/runner/.ansible/collections/
|
||||
ls -l /home/runner/.ansible/collections/ansible_collections/
|
||||
ls -l /home/runner/.ansible/collections/ansible_collections/kubernetes/
|
||||
ls -l /home/runner/.ansible/collections/ansible_collections/kubernetes/kubevirt/
|
||||
|
||||
- name: Create changelog and documentation
|
||||
uses: ansible-middleware/collection-docs-action@main
|
||||
with:
|
||||
collection_fqcn: kubernetes.kubevirt
|
||||
collection_repo: kubevirt/kubernetes.kubevirt
|
||||
dependencies: false
|
||||
commit_changelog: false
|
||||
commit_ghpages: true
|
||||
changelog_release: false
|
||||
generate_docs: true
|
||||
path: /home/runner/.ansible/collections/ansible_collections/kubernetes/kubevirt
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user