Update xelatex.yml #35
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: Generate PDF with XeLaTeX | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- v2 | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: v2 | |
- name: Ensure upload directory exists | |
run: | | |
if ($env:RUNNER_OS -eq 'Windows') { | |
if (-Not (Test-Path -Path 'NextJS-App\resgen\uploads')) { | |
New-Item -ItemType Directory -Path 'NextJS-App\resgen\uploads' | |
} | |
} else { | |
mkdir -p NextJS-App/resgen/uploads | |
} | |
- name: Compile LaTeX to PDF | |
run: | | |
if ($env:RUNNER_OS -eq 'Windows') { | |
cd NextJS-App\resgen\uploads | |
xelatex -interaction=nonstopmode resume_output.tex; if ($LastExitCode -ne 0) { exit 0 } | |
} else { | |
cd NextJS-App/resgen/uploads | |
xelatex -interaction=nonstopmode resume_output.tex || true | |
} | |
- name: Upload PDF artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: compiled-pdf | |
path: NextJS-App/resgen/uploads/resume_output.pdf |