Merge branch 'main' of github.com:klaeufer/cv #61
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
# Action was shamelessly copied from here: https://stackoverflow.com/a/64311970 | |
name: Deploy CV | |
on: | |
push: | |
branches: | |
- master | |
- main | |
tags: | |
- v* | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.11' | |
- name: Upgrade pip | |
run: | | |
python3 -m pip install --upgrade pip | |
- name: Get pip cache dir | |
id: pip-cache | |
run: echo "::set-output name=dir::$(pip cache dir)" | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: python3 -m pip install -r requirements.txt | |
- name: Working directory check | |
run: | | |
pwd | |
ls | |
- name: Collate Bibliography | |
run: | | |
pushd bibs >& /dev/null | |
bash gather.sh | |
popd >& /dev/null | |
cp bibliography/allpubs.bib laufer-cv.bib | |
python3 ./tools/scholarly-metrics.py --name "Konstantin Läufer" | |
python3 ./tools/github-commits.py --first-year 2017 --last-year 2022 --username klaeufer --modern-cv | |
- name: Build LaTeX Document | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: laufer-cv.tex | |
- name: Check for Resulting PDF and Collated Bibliography | |
run: | | |
ls laufer-cv.{pdf,bib} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
laufer-cv.bib | |
laufer-cv.pdf |