Skip to content

Commit 3ee0018

Browse files
author
GitHub Actions
committed
Fix workflow PDF generation
- Updated Sphinx project name to 'UNIT PULSAR H2' - Fixed repository URL in sphinx configuration - Added PDF configuration for correct filename generation - Updated workflow to dynamically detect generated PDF files - Now generates unitpulsarh2.pdf instead of programmer.pdf
1 parent afe6c31 commit 3ee0018

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

.github/workflows/build_docs.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ jobs:
8585
cp software/documentation/build/${REPO_NAME}_product_brief.pdf docs/
8686
8787
# PDF generado por Sphinx
88-
cp software/sphinx/pdf/programmer.pdf docs/${REPO_NAME}_sphinx.pdf
88+
pdf_file=$(ls software/sphinx/pdf/*.pdf 2>/dev/null | head -n1)
89+
if [ -n "$pdf_file" ]; then
90+
cp "$pdf_file" docs/${REPO_NAME}_sphinx.pdf
91+
else
92+
echo "No PDF found in software/sphinx/pdf/"
93+
fi
8994
9095
# HTML generado por Sphinx
9196
cp -r software/sphinx/docs/* docs/

software/sphinx/src/source/conf.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import sys
1212
sys.path.insert(0, os.path.abspath('.'))
1313

14-
project = 'UNIT NANO C6'
14+
project = 'UNIT PULSAR H2'
1515
copyright = '2024, Unit Electronics'
1616
author = 'Cesar Bautista'
1717
release = '0.0.1'
@@ -39,7 +39,7 @@
3939

4040
templates_path = ['_templates']
4141
html_theme_options = {
42-
"repository_url": "https://github.com/UNIT-Electronics-MX/unit_pulsar_esp32_c6",
42+
"repository_url": "https://github.com/UNIT-Electronics-MX/unit_pulsar_esp32_h2",
4343
"repository_branch": "main", # Rama principal de tu repositorio
4444
"path_to_docs": "docs/", # Ruta a la documentación dentro del repositorio
4545
"use_repository_button": True, # Muestra un botón que enlaza al repositorio
@@ -57,3 +57,6 @@
5757
html_css_files = [
5858
'custom.css',
5959
]
60+
61+
# PDF configuration
62+
pdf_documents = [('index', 'unit_pulsar_h2', 'UNIT PULSAR H2 Documentation', 'Unit Electronics')]

0 commit comments

Comments
 (0)