Update resume.tex #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile LaTeX and Release PDF | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- resume.tex | |
- resume.cls | |
pull_request: | |
jobs: | |
build_latex: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Git repository | |
uses: actions/checkout@v4 | |
- name: Install poppler-utils | |
run: sudo apt-get install -y poppler-utils | |
- name: Create legacy PDF | |
run: cp Lee-Ka-Chun_Resume.pdf "./legacy/Lee-Ka-Chun_Resume_$(date +%d)_$(date +%m)_$(date +%Y).pdf" | |
- name: Compile LaTeX document | |
uses: xu-cheng/latex-action@v3 | |
with: | |
root_file: resume.tex | |
latexmk_use_xelatex: true | |
latexmk_shell_escape: true | |
pre_compile: | | |
apk add msttcorefonts-installer fontconfig | |
update-ms-fonts | |
fc-cache -f | |
args: -pdf -interaction=nonstopmode -halt-on-error -jobname=Lee-Ka-Chun_Resume | |
- name: Convert PDF to PNG | |
run: pdftoppm -png -singlefile Lee-Ka-Chun_Resume.pdf Lee-Ka-Chun_Resume-1 | |
- name: Rename and remove PNG file | |
run: | | |
rm Lee-Ka-Chun_Resume.png | |
mv Lee-Ka-Chun_Resume-1.png Lee-Ka-Chun_Resume.png | |
- name: Configure Git | |
run: | | |
git config --global user.name 'Ken Lee' | |
git config --global user.email '[email protected]' | |
- name: Commit and push compiled files | |
run: | | |
git add Lee-Ka-Chun_Resume.pdf Lee-Ka-Chun_Resume.png ./legacy/** | |
git commit -m "Update resume" | |
git push | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.run_number }} | |
release_name: Release ${{ github.run_number }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Assets | |
id: upload-release-assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./Lee-Ka-Chun_Resume.pdf | |
asset_name: Lee-Ka-Chun_Resume.pdf | |
asset_content_type: pdf |