-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (27 loc) · 1.22 KB
/
compile.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
name: Build LaTeX resume
on: [push]
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v2
- name: Compile LaTeX resume
uses: xu-cheng/latex-action@v2
with:
root_file: main.tex
- name: Delete old resume.pdf
run: rm resume.pdf
- name: Compress PDF
uses: jy95/ghostscript-action@v1
with:
file: 'main.pdf'
output: 'resume.pdf'
arbitrary-parameters: '-dBATCH -dNOPAUSE -dSAFER -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dDownsampleGrayImages=true -dDownsampleColorImages=true -dDownsampleMonoImages=true -dColorImageDownsampleType=/Bicubic -dColorImageResolution=200 -dGrayImageDownsampleType=/Bicubic -dGrayImageResolution=200 -dMonoImageDownsampleType=/Bicubic -dMonoImageResolution=200 -dEmbedAllFonts=true -dSubsetFonts=true'
- name: Commit the latest resume
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git add resume.pdf
git commit -am "Update resume"
git push --all -f https://${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git