docs: update latex_templates #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all tags and branches | |
- name: Setup LaTeX environment | |
uses: Mister-Kin/actions/setup-latex-action@main | |
- name: Detect changes | |
uses: dorny/paths-filter@v3 | |
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: | |
latex_project_dir: latex_templates/cls_style | |
cls_file_is_in_project_dir: false | |
access_token: ${{ secrets.ACCESS_TOKEN }} | |
- 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: | |
latex_project_dir: latex_templates/cls_style_light | |
cls_file_is_in_project_dir: false | |
access_token: ${{ secrets.ACCESS_TOKEN }} | |
# - 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: | |
# latex_project_dir: articles/free_fonts | |
# cls_file_is_in_project_dir: false | |
# access_token: ${{ secrets.ACCESS_TOKEN }} | |
- 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: | |
latex_project_dir: manuals/toggle_language | |
cls_file_is_in_project_dir: false | |
access_token: ${{ secrets.ACCESS_TOKEN }} |