Modify README about tex2word #27
Workflow file for this run
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: Build Paper | |
on: | |
- push | |
- pull_request | |
jobs: | |
unittest: | |
name: Paper build | |
runs-on: ${{ matrix.os }} | |
if: "!contains(github.event.head_commit.message, 'ci skip')" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- 'ubuntu-22.04' | |
latex-entry: | |
- 'sample-bachelor' | |
- 'sample-kaitireport' | |
- 'sample-master' | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 10 | |
- name: Set up system dependences on linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y tree cloc make | |
- name: Load the font requirements | |
run: | | |
mkdir -p ./local_fonts | |
curl -L 'https://github.com/dolbydu/font/raw/master/unicode/SimSun.ttc' -o ./local_fonts/SimSun.ttc # download songti | |
curl -L 'https://github.com/dolbydu/font/raw/master/unicode/SimHei.ttf' -o ./local_fonts/SimHei.ttf # download heiti | |
curl -L 'https://github.com/dolbydu/font/raw/master/unicode/STXingkai.TTF' -o ./local_fonts/STXingkai.ttf # download STXingKai | |
curl -L 'https://github.com/dolbydu/font/raw/master/unicode/STKaiti.TTF' -o ./local_fonts/STKaiti.ttf # download STKaiTi | |
- name: Test the basic environment | |
run: | | |
tree . | |
cloc . | |
- name: Compile ${{ matrix.latex-entry }}.tex to pdf | |
uses: xu-cheng/latex-action@v2 | |
with: | |
root_file: ${{ matrix.latex-entry }}.tex | |
latexmk_use_xelatex: true | |
latexmk_shell_escape: true | |
extra_fonts: | | |
./local_fonts/* | |
pre_compile: | | |
apk add msttcorefonts-installer fontconfig | |
update-ms-fonts | |
fc-cache -f | |
- name: Test the compiled file | |
run: | | |
ls -al *.pdf | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.latex-entry }}.pdf | |
path: ${{ matrix.latex-entry }}.pdf |