mirror of
https://github.com/kubevirt/kubevirt.core.git
synced 2026-07-25 00:44:35 +00:00
actions/checkout v7 changed credential persistence from http.extraheader to includeIf.gitdir-scoped config files. The collection-docs-action does not pick up the new credential format, breaking git push to gh-pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
75 lines
2.2 KiB
YAML
75 lines
2.2 KiB
YAML
---
|
|
name: Documentation
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
docs:
|
|
runs-on: ubuntu-latest
|
|
# Do not run in private forks
|
|
if: github.repository == 'kubevirt/kubevirt.core'
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
collection_dir: ansible_collections/kubevirt/core
|
|
work_dir: /home/runner/.ansible/collections
|
|
steps:
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v7
|
|
with:
|
|
path: ${{ env.collection_dir }}
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
cache: pip
|
|
|
|
- name: Install doc dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools
|
|
pip install \
|
|
-r ${{ env.collection_dir }}/docs/requirements.txt
|
|
pip install \
|
|
-r ${{ env.collection_dir }}/requirements.txt
|
|
mkdir -p ${{ env.work_dir }}
|
|
ansible-galaxy collection install \
|
|
-r ${{ env.collection_dir }}/requirements.yml \
|
|
-p ${{ env.work_dir }} --force-with-deps
|
|
sudo apt install -y sed hub
|
|
|
|
- name: Move collection to work dir
|
|
run: |
|
|
cp -rp ansible_collections \
|
|
${{ env.work_dir }}
|
|
|
|
- name: Set up git credentials for gh-pages push
|
|
run: |
|
|
cd ${{ env.collection_dir }}
|
|
git config credential.helper \
|
|
'!f() { echo "username=x-access-token"; echo "password=${GITHUB_TOKEN}"; }; f'
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- 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: ${{ env.work_dir }}/${{ env.collection_dir }}
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
bot_email: kubevirtbot@redhat.com
|
|
bot_account: kubevirt-bot
|