Skip to content

Commit

Permalink
Merge pull request #75 from meraki/fmunozmiranda-patch-2
Browse files Browse the repository at this point in the history
Update docs.yml
  • Loading branch information
fmunozmiranda authored Dec 18, 2024
2 parents 2475c05 + 660567e commit f71e9ee
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<div class="col-md-4 center"><a href="@@/" class="btn-doc btn"><i class="fa fa-newspaper-o"></i><p>@@</p></a></div>' >> index.html
(echo main; dirname v*/index.html | sort --version-sort --reverse) \
| xargs -I@@ \
-n1 echo '<div class="col-md-4 center"><a href="@@/" class="btn-doc btn"><i class="fa fa-newspaper-o"></i><p>@@</p></a></div>' >> 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

0 comments on commit f71e9ee

Please sign in to comment.