In 2018, I wrote a blog post about how I automatically publish my CV.

Time flies, and at the moment I'm migrating some of my old projects to a different server.

So, I decided to migrate my CV CD pipeline as well, but with „2020“ tech.

Same same, but different

I'm no longer hosting Git repos by myself, but moved everything to GitHub.

No more post-update hooks, no more Docker, BUT GitHub Actions! 💪

xu-cheng/latex-action compiles my LaTeX file and actions/upload-artifact attaches the resulting file to the respective workflow run.

Additionally, I added my SSH deploy setup to publish the PDF file to my server.

Workflow file

The complete workflow file for re-use looks like this:

name: Build LaTeX document
on: [push]
jobs:
  build_latex:
    runs-on: ubuntu-latest
    steps:
      - name: Set up Git repository
        uses: actions/checkout@v2
      - name: Compile LaTeX document
        uses: xu-cheng/latex-action@v2
        with:
          root_file: |
            cv_en.tex
      - name: Publish 
        uses: actions/upload-artifact@v2
        with:
          name: cv
          path: cv_en.pdf
      - name: ssh deploy
        uses: easingthemes/ssh-deploy@v2.1.5
        env:
          ARGS: "-rtgoDzvO --no-links"
          SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
          REMOTE_HOST: ${{ secrets.DEPLOY_HOST }}
          REMOTE_USER: ${{ secrets.DEPLOY_USER }}
          REMOTE_PORT: ${{ secrets.DEPLOY_PORT }}
          SOURCE: "cv_en.pdf"
          TARGET: ${{ secrets.DEPLOY_TARGET }}

So long

Simon