77 - ' software/documentation/**'
88 - ' software/sphinx/**'
99 - ' README.md'
10+ - ' hardware/**'
1011 - ' .github/workflows/build_pdf.yml'
1112 pull_request :
1213 branches : [main]
1314 paths :
1415 - ' software/documentation/**'
1516 - ' software/sphinx/**'
1617 - ' README.md'
18+ - ' hardware/**'
1719 workflow_dispatch :
1820
1921permissions :
3840 sudo apt-get install -y texlive-latex-extra texlive-fonts-recommended texlive-lang-english ghostscript latexmk
3941 pip install -r software/documentation/requirements.txt
4042 pip install -r software/sphinx/requirements.txt
43+ pip install Jinja2
4144
4245 # ################################################
4346 # Generar PDF del Product Brief con nombre del repo
5356 -dNOPAUSE -dQUIET -dBATCH \
5457 -sOutputFile=build/${REPO_NAME}_product_brief.pdf build/*.pdf
5558
59+ # ################################################
60+ # Procesar Documentación de Hardware
61+ # ################################################
62+ - name : Clean previous hardware documentation
63+ run : |
64+ chmod +x .github/workflows/scripts/clean_docs.sh
65+ .github/workflows/scripts/clean_docs.sh
66+
67+ - name : Copy hardware files and generate HTML
68+ run : |
69+ chmod +x .github/workflows/scripts/build_docs.sh
70+ .github/workflows/scripts/build_docs.sh
71+
5672 # ################################################
5773 # Generar Documentación Sphinx (HTML + PDF)
5874 # ################################################
@@ -62,14 +78,19 @@ jobs:
6278 make clean
6379 make pdfx
6480
81+ - name : Add hardware link to Sphinx docs
82+ run : |
83+ chmod +x .github/workflows/scripts/add_hardware_link.sh
84+ .github/workflows/scripts/add_hardware_link.sh
85+
6586 # ################################################
6687 # Preparar contenido para docs/
6788 # ################################################
6889 - name : Prepare docs/ directory
6990 env :
7091 REPO_NAME : ${{ github.event.repository.name }}
7192 run : |
72- rm -rf docs
93+ # Crear directorio docs si no existe (pero no eliminar hardware/)
7394 mkdir -p docs
7495
7596 # PDF generado desde LaTeX
7899 # PDF generado por Sphinx
79100 cp software/sphinx/pdf/programmer.pdf docs/${REPO_NAME}_sphinx.pdf
80101
81- # HTML generado por Sphinx
82- cp -r software/sphinx/docs/* docs/
102+ # HTML generado por Sphinx (copiar archivos, no sobrescribir hardware/)
103+ rsync -av --exclude='hardware' --exclude='hardware.html' software/sphinx/docs/ docs/
83104
84105 # Permitir archivos especiales en GitHub Pages
85106 touch docs/.nojekyll
0 commit comments