From 660567e046763b428f46a5addb9c12b559d21594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francisco=20Mu=C3=B1oz=20Miranda?= <93611708+fmunozmiranda@users.noreply.github.com> Date: Wed, 18 Dec 2024 14:11:11 -0600 Subject: [PATCH] Update docs.yml --- .github/workflows/docs.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1ccf4879..4498aadb 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -12,39 +12,32 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: configure git run: | git config user.name "${GITHUB_ACTOR}" git config user.email "${GITHUB_ACTOR}@bots.github.com" git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* - - name: Set up Python uses: actions/setup-python@v5 with: - python-version: "3.10" - - - name: Install Ansible and dependencies + python-version: "3.8" + - name: Install dependencies run: | - python -m pip install --upgrade pip - pip install ansible==2.10.0 # Instalación de una versión compatible de Ansible - pip install antsibull-docs # Instala antsibull-docs para generar documentación - pip install -r requirements.txt # Si tienes un archivo requirements.txt, instálalo aquí - make doc-setup # Si tienes un objetivo en el Makefile para preparar la documentación - + pip install antsibull-docs + make doc-setup - name: Build docs - run: make doc # Construye la documentación - + run: make doc - name: commit docs run: | git checkout gh-pages rm -rf $(basename ${GITHUB_REF}) mv docs/_build/html $(basename ${GITHUB_REF}) git show origin/main:docs/_gh_include/header.inc > index.html - (echo main; dirname v*/index.html | sort --version-sort --reverse) | xargs -I@@ -n1 echo '

@@

' >> index.html + (echo main; dirname v*/index.html | sort --version-sort --reverse) \ + | xargs -I@@ \ + -n1 echo '

@@

' >> index.html git show origin/main:docs/_gh_include/footer.inc >> index.html git add $(basename ${GITHUB_REF}) index.html git commit -m "update docs for $(basename ${GITHUB_REF})" || true - - name: push docs run: git push origin gh-pages