Skip to content

Commit 25e540f

Browse files
author
Shelson Ferrari
committed
ajuste ci cd para gerar pdf cv shelson
1 parent 92d0a2d commit 25e540f

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ jobs:
240240

241241
- name: Generate CV PDFs
242242
run: |
243+
cd sys
243244
python sys/markdown_to_pdf.py
244245
245246
# - name: Upload PDF artifacts

sys/markdown_to_pdf.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,20 @@ def highlight_code(code, language):
8383
}
8484
]
8585

86-
# ---------------------------------
87-
# Determine the base directory of the project
88-
# ---------------------------------
89-
project_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
90-
9186
# ---------------------------------
9287
# Paths for input and output directories
9388
# ---------------------------------
94-
input_md_dir = os.path.join(project_dir, 'sys', 'cv')
95-
output_pdf_dir = os.path.join(project_dir, 'sys', 'pdf')
89+
input_md_dir = './cv/'
90+
output_pdf_dir = './pdf'
9691

9792
if not os.path.exists(output_pdf_dir):
9893
os.makedirs(output_pdf_dir)
9994

10095
# ---------------------------------
10196
# Paths for CSS files
10297
# ---------------------------------
103-
css_file_path = os.path.join(project_dir, 'sys', 'style.css')
104-
css_file_theme_path = os.path.join(project_dir, 'sys', 'css', 'mdTheme', 'default.css')
98+
css_file_path = './style.css'
99+
css_file_theme_path = './css/mdTheme/default.css'
105100

106101
# ---------------------------------
107102
# Read CSS file contents
@@ -120,8 +115,8 @@ def gerar_pdf(document):
120115
# ---------------------------------
121116
# Path for the Markdown file
122117
# ---------------------------------
123-
markdown_file_path = os.path.join('sys', input_md_dir, f"{document['nome']}.md")
124-
output_pdf_path = os.path.join('sys', output_pdf_dir, f"{document['nome']}.pdf")
118+
markdown_file_path = os.path.join(input_md_dir, f"{document['nome']}.md")
119+
output_pdf_path = os.path.join(output_pdf_dir, f"{document['nome']}.pdf")
125120

126121
# ---------------------------------
127122
# Read the Markdown file
@@ -166,6 +161,8 @@ def gerar_pdf(document):
166161
@top-center {{
167162
margin-top: 14px;
168163
}}
164+
165+
169166
}}
170167
171168
@page {{

0 commit comments

Comments
 (0)