-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.61 KB
/
latex.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
name: Build and Deploy CV to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Node.js 20
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up LaTeX environment
uses: xu-cheng/latex-action@v3
with:
root_file: CV.tex
latexmk_use_lualatex: true
root: .
- name: Commit and Push changes to update-cv branch
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git checkout -b update-cv || git checkout update-cv
git add CV.pdf
git commit -m "Update CV.pdf"
git fetch origin
git merge origin/update-cv --no-ff -m "Merge remote-tracking branch 'origin/update-cv'"
git checkout --theirs CV.pdf
git add CV.pdf
git add .github/workflows/latex.yml
git commit --amend --no-edit
git push origin update-cv
- name: Create a Pull Request to the Private Repository
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.SSH_PRIVATE_KEY }}" \
-d '{
"title": "Update CV Repository",
"head": "update-cv", # The branch you're creating the PR from
"base": "main", # The branch you're merging into
"body": "Automated PR to update CV"
}' \
https://api.github.com/repos/nsswifter/AcademicApplicationDocuments/pulls