Skip to content

Cover letter

Cover letter #19

Workflow file for this run

name: LaTeX Build and Deploy
on:
push:
branches:
- main
paths:
- "**/*.tex"
- ".github/workflows/*.yml"
pull_request:
branches:
- main
paths:
- "**/*.tex"
- ".github/workflows/*.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker image
run: make build
- name: Compile LaTeX to PDF
run: docker run --rm -v "${{ github.workspace }}:/workspace" latex-builder
- name: Convert PDF to PNG
run: make png
- name: Upload PDF as artifact
uses: actions/upload-artifact@v2
with:
name: compiled-pdf
path: |
src/main.pdf
main.png
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: compiled-pdf
path: .
- name: Commit and push compiled PDF
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add --force src/main.pdf main.png
git commit -m 'chore: add compiled PDF and CV image [skip ci]'
git push