forked from stevengogogo/ReportTex
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (42 loc) · 1.03 KB
/
ci.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
name: Build LaTex Document
on:
push:
branches:
- main
tags:
- '*'
pull_request:
branches:
- main
jobs:
CI:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download CJK fonts
run: sudo apt update && sudo apt install -y fonts-noto-cjk
- uses: actions/cache@v4.1.2
name: Cache tectonic and fonts
with:
path: |
~/.cache/Tectonic
~/.local/share/fonts
key: ${{ runner.os }}-tectonic-${{ hashFiles('**/*.tex') }}
restore-keys: |
${{ runner.os }}-tectonic-
- name: Setup tectonic
uses: wtfjoke/setup-tectonic@v3.0.4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Compile TeX to PDF
run: tectonic main.tex
- name: Tag release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: main.pdf
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}