fix workflow #4
This commit is contained in:
10
.github/workflows/generate-pdf.yml
vendored
10
.github/workflows/generate-pdf.yml
vendored
@@ -25,11 +25,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Prepare markdown (strip manual TOC)
|
- name: Prepare markdown (strip manual TOC)
|
||||||
run: |
|
run: |
|
||||||
cd paper
|
|
||||||
# Remove the manual TOC table between "## Table des matières" and the next "---"
|
# Remove the manual TOC table between "## Table des matières" and the next "---"
|
||||||
python3 -c "
|
python3 -c "
|
||||||
import re
|
import re
|
||||||
with open('README.md', 'r', encoding='utf-8') as f:
|
with open('paper/README.md', 'r', encoding='utf-8') as f:
|
||||||
content = f.read()
|
content = f.read()
|
||||||
content = re.sub(
|
content = re.sub(
|
||||||
r'## Table des matières\n+\|.*?\n\n---',
|
r'## Table des matières\n+\|.*?\n\n---',
|
||||||
@@ -37,7 +36,7 @@ jobs:
|
|||||||
content,
|
content,
|
||||||
flags=re.DOTALL
|
flags=re.DOTALL
|
||||||
)
|
)
|
||||||
with open('paper_clean.md', 'w', encoding='utf-8') as f:
|
with open('paper/paper_clean.md', 'w', encoding='utf-8') as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
"
|
"
|
||||||
|
|
||||||
@@ -63,9 +62,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate PDF
|
- name: Generate PDF
|
||||||
run: |
|
run: |
|
||||||
cd paper
|
pandoc paper/metadata.yaml paper/paper_clean.md \
|
||||||
pandoc metadata.yaml paper_clean.md \
|
-o paper/xerboxion_paper.pdf \
|
||||||
-o xerboxion_paper.pdf \
|
|
||||||
--pdf-engine=xelatex \
|
--pdf-engine=xelatex \
|
||||||
--toc \
|
--toc \
|
||||||
--toc-depth=3 \
|
--toc-depth=3 \
|
||||||
|
|||||||
Reference in New Issue
Block a user