-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (38 loc) · 1.1 KB
/
tex.yml
File metadata and controls
38 lines (38 loc) · 1.1 KB
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
name: Build LaTeX document
on: [push]
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v6
- name: Compile LaTeX document
uses: xu-cheng/latex-action@v4
with:
root_file: Paper.tex
- name: Upload PDF file
uses: actions/upload-artifact@v4
with:
name: PDF
path: Paper.pdf
- name: Configure Git
run: |
git config user.name "Aidans Tex Bot"
git config user.email "aidan@google.com"
- name: Fetch and reset to the remote state
run: |
git fetch origin ${{ github.ref }}
git reset --hard FETCH_HEAD
- name: Add and commit PDF to repository
run: |
git add Paper.pdf
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "Add compiled PDF"
fi
- name: Push changes
uses: ad-m/github-push-action@v1.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}