Skip to content

Commit 4ee8fc9

Browse files
author
dphuang2
committed
use node to create pdf
1 parent 5cd7966 commit 4ee8fc9

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/create-pdf.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,14 @@ jobs:
1818
mkdir output
1919
cp resume-stylesheet.css output/resume-stylesheet.css
2020
cp resume.md output/${{ github.actor }}-resume.md
21-
# Install pandoc and weasyprint
22-
- name: "Install pandoc and weasyprint"
21+
# Install pandoc and setup pnpm
22+
- name: "Install pandoc and setup pnpm"
2323
working-directory: markdown-resume
2424
run: |
2525
wget https://github.com/jgm/pandoc/releases/download/3.0.1/pandoc-3.0.1-1-amd64.deb
2626
sudo apt install ./pandoc-3.0.1-1-amd64.deb
27-
sudo apt-get update
28-
sudo apt-get install -y python3-pip
29-
pip3 install weasyprint
27+
npm install -g pnpm
28+
pnpm install
3029
3130
- name: "Convert MD to HTML"
3231
working-directory: markdown-resume
@@ -36,7 +35,12 @@ jobs:
3635
- name: "Convert HTML to PDF"
3736
working-directory: markdown-resume
3837
run: |
39-
weasyprint output/${{github.actor}}-resume.html output/${{github.actor}}-resume.pdf
38+
node generate-pdf.js
39+
40+
- name: "Move PDF to output"
41+
working-directory: markdown-resume
42+
run: |
43+
mv resume.pdf output/${{github.actor}}-resume.pdf
4044
4145
- uses: actions/upload-artifact@master
4246
with: # basically this will put resume.md, resume.html, resume.pdf and resume-stylesheet.css in a zip file.

0 commit comments

Comments
 (0)