-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 1.92 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# 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"
first_year=$(date --date="5 years ago" +%Y)
last_year=$(date --date="1 year ago" +%Y)
python3 ./tools/github-commits.py --first-year $first_year --last-year $last_year --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