-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 3.36 KB
/
compile_latex_and_upload_pdf.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Compile LaTeX and upload PDF # Actions 名字
on: # 触发条件
push:
paths:
- '.github/**'
- 'articles/**'
- 'latex_templates/**'
- 'manuals/**'
- 'public_resources/**'
- 'translations/**'
env:
TZ: Asia/Shanghai # 一个全局变量,用以设置时区
jobs:
compile_latex_and_upload_pdf: # job id
name: Compile LaTeX and upload PDF # job 名,不写默认使用 job id
runs-on: ubuntu-latest # 运行环境
steps:
- name: Checkout source files # 拉取最新的源文件
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- name: Setup LaTeX environment
uses: Mister-Kin/actions/setup-latex-action@main
with:
lanzou_cookie_id: ${{ secrets.LANZOU_COOKIE_ID }}
lanzou_cookie_value: ${{ secrets.LANZOU_COOKIE_VALUE }}
- name: Detect changes
uses: dorny/paths-filter@v2
id: filter
with:
filters: |
public_resources:
- 'public_resources/**'
cls_style_template:
- 'latex_templates/cls_style/**'
cls_style_light_template:
- 'latex_templates/cls_style_light/**'
free_fonts:
- 'articles/free_fonts/**'
toggle_language:
- 'manuals/toggle_language/**'
- name: Compile cls_style_template
if: ${{ (steps.filter.outputs.cls_style_template == 'true') || (steps.filter.outputs.public_resources == 'true') }}
uses: Mister-Kin/actions/compile-latex-and-upload-pdf@main
with:
lanzou_cookie_id: ${{ secrets.LANZOU_COOKIE_ID }}
lanzou_cookie_value: ${{ secrets.LANZOU_COOKIE_VALUE }}
lanzou_target_id: 6435536
latex_project_dir: latex_templates/cls_style
cls_file_is_in_project_dir: false
- name: Compile cls_style_light_template
if: ${{ (steps.filter.outputs.cls_style_light_template == 'true') || (steps.filter.outputs.public_resources == 'true') }}
uses: Mister-Kin/actions/compile-latex-and-upload-pdf@main
with:
lanzou_cookie_id: ${{ secrets.LANZOU_COOKIE_ID }}
lanzou_cookie_value: ${{ secrets.LANZOU_COOKIE_VALUE }}
lanzou_target_id: 6435536
latex_project_dir: latex_templates/cls_style_light
cls_file_is_in_project_dir: false
# - name: Compile free_fonts
# if: ${{ (steps.filter.outputs.free_fonts == 'true') || (steps.filter.outputs.public_resources == 'true') }}
# uses: Mister-Kin/actions/compile-latex-and-upload-pdf@main
# with:
# lanzou_cookie_id: ${{ secrets.LANZOU_COOKIE_ID }}
# lanzou_cookie_value: ${{ secrets.LANZOU_COOKIE_VALUE }}
# lanzou_target_id: 6435542
# latex_project_dir: articles/free_fonts
# cls_file_is_in_project_dir: false
- name: Compile toggle_language
if: ${{ (steps.filter.outputs.toggle_language == 'true') || (steps.filter.outputs.public_resources == 'true') }}
uses: Mister-Kin/actions/compile-latex-and-upload-pdf@main
with:
lanzou_cookie_id: ${{ secrets.LANZOU_COOKIE_ID }}
lanzou_cookie_value: ${{ secrets.LANZOU_COOKIE_VALUE }}
lanzou_target_id: 3635715
latex_project_dir: manuals/toggle_language
cls_file_is_in_project_dir: false