Hosting my CV with github actions

The Goal

I want to host the PDF of my CV on this site. I want it to link to the latest compiled version from where it’s tracked on github (private repo).

How I was doing it before

I linked to a public shared folder on my Dropbox. This meant that every time I update the CV locally, I have to upload the new version to github.

The solution

Building the document and releasing it

First, I created a new github action to build the PDF of the CV from .tex like this (only the jobs section necessary to show here):

    runs-on: ubuntu-latest
      - name: Checkout repository
        uses: actions/checkout@v3
      - name: Compile
        uses: xu-cheng/latex-action@v2
          working-directory: "CV"
          root_file: |
          pre_compile: |
            make build-bib
      - name: Create Release
        uses: softprops/action-gh-release@v1
          tag_name: latest
          files: John_Brevard_Sigman_CV.pdf
      - name: Clear old releases
        uses: dev-drprasad/delete-older-releases@v0.2.1
          keep_latest: 1
          GITHUB_TOKEN: $
      - name: Close
        run: exit 0

I use xu-cheng/latex-action@v2 to compile to PDF, preceded by running build-bib from the make target (see below):

	latex John_Brevard_Sigman_CV.tex
	latex John_Brevard_Sigman_CV.tex
	bibtex John_Brevard_Sigman_CV1-blx
	bibtex John_Brevard_Sigman_CV2-blx
	bibtex John_Brevard_Sigman_CV3-blx

The three calls to bibtex are to compile separate bibliographies papers.bib, patents.bib, and government_reports.bib from the auxiliary files *CV[X]-blx. These files were generated by the two calls to latex.

Fetching the release from the website

I next modified the deployment action for this github pages website so that it would fetch the latest release of the CV repo.

Personal Access Token

First, make a personal access token with fine-grained read-only permission to the CV repo. Then, upload this as an encrypted secret (CV_ACCESS_TOKEN) of the website repo.

Action to pull the release

- name: Get latest CV release
  uses: robinraju/release-downloader@v1.8
    repository: "jsigman/CV"
    latest: true
    fileName: "John_Brevard_Sigman_CV.pdf"
    out-file-path: "assets/pdf/"
    token: ${{ secrets.CV_ACCESS_TOKEN }}

I use robinraju/release-downloader@v1.8 fetch the latest release, and it’s ready to be shared on the website. This setup is clean and hands off!

Enjoy Reading This Article?

Here are some more articles you might like to read next:

  • Literate emacs config as a webpage
  • Why we can interpret softmax scores as probabilities
  • Indicating which blocks are loaded in webpage literate elisp
  • Studying Eigenvalues of Rotation Group Matrices
  • Company Announcement about LLM Project