Updates from Overleaf #16
This file contains hidden or 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: Build LaTeX PDF and push to GitHub Pages repo | |
| on: | |
| push: | |
| paths: | |
| - '**/*.tex' | |
| - '**/*.bib' | |
| - '**/*.sty' | |
| - '.github/workflows/latex-build.yml' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code (CV_HARI repo) | |
| uses: actions/checkout@v3 | |
| - name: Install LaTeX & latexmk | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| texlive-latex-base \ | |
| texlive-latex-recommended \ | |
| texlive-latex-extra \ | |
| texlive-fonts-recommended \ | |
| latexmk | |
| - name: Compile PDF | |
| run: | | |
| latexmk -pdf -interaction=nonstopmode -halt-on-error main.tex | |
| mv main.pdf CV_HARI.pdf | |
| - name: Push PDF to GitHub Pages Repo | |
| run: | | |
| git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/Hariprashad-Ravikumar/hariprashad-ravikumar.github.io.git temp_repo | |
| mkdir -p temp_repo/cv | |
| cp CV_HARI.pdf temp_repo/cv/ | |
| cd temp_repo | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add cv/CV_HARI.pdf | |
| git commit -m "Auto-update CV_HARI.pdf from CV_HARI repo" | |
| git push origin main | |
| - name: Clean PDF from original CV_HARI repo (optional cleanup) | |
| run: | | |
| rm CV_HARI.pdf |