Skip to content

Commit 750a80a

Browse files
committed
fill out build.yml
1 parent 297348c commit 750a80a

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

.github/workflows/build.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1+
name: Build Resume PDF
12

3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Pandoc
18+
uses: r-lib/actions/setup-pandoc@v2
19+
20+
- name: Install LaTeX
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-latex-extra
24+
25+
- name: Convert Markdown to PDF
26+
run: |
27+
pandoc resume.md -o resume.pdf \
28+
--pdf-engine=pdflatex \
29+
--variable geometry:margin=1in \
30+
--variable fontfamily=serif \
31+
--variable fontsize=11pt \
32+
--variable linestretch=1.15
33+
34+
- name: Upload PDF artifact
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: resume-pdf
38+
path: resume.pdf
39+
40+
- name: Commit PDF back to repo (optional)
41+
run: |
42+
git config --local user.email "action@github.com"
43+
git config --local user.name "GitHub Action"
44+
git add resume.pdf
45+
git diff --staged --quiet || git commit -m "Auto-update resume PDF"
46+
git push
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)