-
Notifications
You must be signed in to change notification settings - Fork 82
45 lines (43 loc) · 1.24 KB
/
main.yaml
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
name: Build LaTeX document
run-name: Deploy ${{ github.event.head_commit.message }}
to main by @${{ github.actor }}
on:
push:
branches:
- main
paths:
- embeddings.bib
- embeddings.tex
pull_request:
branches:
- main
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v3
with:
root_file: embeddings.tex
latexmk_shell_escape: true
continue_on_error: true
docker_image: ghcr.io/xu-cheng/texlive-full:20230701
- name: Upload PDF file
uses: actions/upload-artifact@v3
with:
name: PDF
path: embeddings.pdf
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "Vicki Boykis"
git fetch origin main
git stash
git rebase origin/main # keep all other changes
git stash pop
git add embeddings.pdf
git commit -m "Regenerate PDF from ${{ github.sha }}"
git push --force # overwrite old PDF
if: github.event_name != 'pull_request'