Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embebed pdf #8

Merged
merged 6 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/github_action_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,23 @@ jobs:
run: docker run -v $(pwd):/latex_content --name latex-container ghcr.io/${{ github.repository_owner }}/latex-build:latest /bin/sh -c "make pdf"

- name: Copy PDF from Docker Container
run: docker cp latex-container:/latex_content/rendered.pdf output.pdf
run: |
docker cp latex-container:/latex_content/rendered.pdf esteban_martinena_cv.pdf
docker cp latex-container:/latex_content/cover.png esteban_martinena_cv.png

- name: Upload PDF as Artifact
uses: actions/upload-artifact@v4
with:
name: compiled-pdf-${{ github.ref_slug }}
path: output.pdf
name: generated-pdf-${{ github.ref_slug }}
path: esteban_martinena_cv.*

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
if: ${{ contains(github.ref, 'tags') }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: output.pdf
asset_name: esteban_martinena_cv.pdf
file: "esteban_martinena_cv*"
file_glob: true
tag: ${{ github.ref }}
overwrite: true
body: "Latest version of my CV."
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,5 @@ build/
*.pdf

*.eps

*.png
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FILE0 = main
TEX_TEMPLATE = $(FILE0).template.tex
TEX = $(FILE0).raw.tex
PDF = $(FILE0).pdf
COVER = cover.png
RAW_PDF = $(FILE0).raw.pdf

all: pdf
Expand All @@ -23,8 +24,10 @@ pdf:
pandoc data.md --pdf-engine xelatex --template $(TEX_TEMPLATE) -o $(TEX) ; \
xelatex -shell-escape -output-driver="xdvipdfmx -z 0" $(TEX) ; \
echo "Compresing PDF..."; \
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -dPrinted=false -sOutputFile=$(PDF) $(RAW_PDF)
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.5 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -dPrinted=false -sOutputFile=$(PDF) $(RAW_PDF); \
gs -sDEVICE=png16m -sOutputFile=cover.png -r144 $(RAW_PDF);
cp build/pdf/$(PDF) ./rendered.pdf
cp build/pdf/$(COVER) ./cover.png

clean-pdf:
rm -rf build/pdf/
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Hi!
My name is Esteban Martinena, a Software Engineer from Spain.
This is my resume, built with LaTeX, Pandoc, Docker...

<p align="center">
<img width="460" src="https://github.com/orensbruli/ten-seconds-cv/releases/latest/download/esteban_martinena_cv.png">
</p>

## Why?
As many other developers, I really hate to write or update my resume.
I've tried many different approaches, but I've never been satisfied with the result.
Expand Down
Binary file removed img/trophy.png
Binary file not shown.