-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (49 loc) · 1.41 KB
/
action_latex.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
46
47
48
49
---
name: Build LaTeX document
on:
push:
paths:
- reports/**
workflow_dispatch: null
jobs:
build_latex:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Compile LaTeX document
uses: xu-cheng/latex-action@master
with:
latexmk_shell_escape: true
root_file: |
thesis.tex
summary.tex
working_directory: reports
latexmk_use_lualatex: true
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
reports/thesis.pdf
reports/summary.pdf
- name: save tmp copy
run: |
mkdir ~/tmplatex
mv reports/thesis.pdf ~/tmplatex/thesis.pdf
- name: setup target repo
uses: actions/checkout@v4
with:
repository: KarelZe/thesis2video
ref: main
token: ${{secrets.API_TOKEN_GITHUB}}
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "action@markusbilz.com"
- name: Move file and push
run: |
mv ~/tmplatex/thesis.pdf ${{github.event.repository.pushed_at}}-thesis.pdf
git add -A
git commit -m "Version @ ${{github.event.repository.pushed_at}}"
git push origin main