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: Build and Publish CV Doc | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build PDF | |
runs-on: ubuntu-latest | |
container: | |
image: registry.gitlab.com/islandoftex/images/texlive:latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Build PDF with latexmk | |
run: | | |
git config --global --add safe.directory $(pwd) | |
sh -c 'latexmk -pdf main.tex; echo "variables.tex"; cat variables.tex' | |
- name: Upload PDF artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: main-pdf | |
path: ./main.pdf | |
deploy: | |
name: Deploy to GitHub Pages | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download PDF artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: main-pdf | |
path: ./ | |
- name: Deploy main.pdf to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./ | |
publish_branch: gh-pages |