-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (58 loc) · 1.69 KB
/
cv-two-pages.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
name: CICV2P
on:
push:
branches:
- main
- 6-cv-jan-2021
- 08-march2021
- 10-oct2021
- 12-cvmarch2022
- 15-may2022
- 15-minor-changes
- 18-june2022
- 18-cv_june2022
- 21-november2022
- 23-feb2023
- 25-march2023
- 27-may2023
- 27-minor-updates-may2023
- 30-july2023
- 30-20thjuly2023
- 33-sep2023
- 35-feb2024
- 37-aug2024
- 39-feb2025
jobs:
build:
if: "contains(github.event.head_commit.message, 'CICV2P')"
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile CV
uses: xu-cheng/latex-action@v2
with:
root_file: cv-two-pages.tex
working_directory: tex
- name: Check pdf files
run: |
file tex/cv-two-pages.pdf | grep -q ' PDF '
- name: Upload cv.pdf
run: |
# configure git
git config --global user.name "mxochicale"
git config --global user.email "[email protected]"
# setup ssh
mkdir ~/.ssh
chmod 700 ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
git config --global core.sshCommand "ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
git clone --depth=1 --branch generated-pdfs [email protected]:mxochicale/cv.git "$GITHUB_WORKSPACE/deploy"
cp -f tex/cv-two-pages.pdf "$GITHUB_WORKSPACE/deploy/cv-two-pages.pdf"
cd "$GITHUB_WORKSPACE/deploy"
git add cv-two-pages.pdf
git commit -m github.event.head_commit.message
git push
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}