Skip to content

Merge pull request #90 from SYSU-SCC/wu-kan-patch-1 #164

Merge pull request #90 from SYSU-SCC/wu-kan-patch-1

Merge pull request #90 from SYSU-SCC/wu-kan-patch-1 #164

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: test
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master] # 其他分支可通过给 master 分支创建一个 WIP 的 PR 查看结果是否正确
tags: ["v*"]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# For softprops/action-gh-release
permissions:
contents: write
discussions: write
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: texlive/texlive:TL2022-historic
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Compile
run: |
apt-get update -y
apt-get install --no-install-recommends -y apt-transport-https ca-certificates software-properties-common
sed -i '/^\([^#].*main\)*$/s/main/& contrib non-free/' /etc/apt/sources.list
apt-get update -y
apt-get install --no-install-recommends -y ttf-mscorefonts-installer make fonts-arphic-ukai fonts-noto-cjk-extra
fc-cache
make pdf
mv main.pdf main.fandol.pdf
sed -i 's| fontset=fandol,| fontset=ubuntu,|' sysuthesis.cls
make pdf
mv main.pdf main.ubuntu.pdf
make pdf -C presentation
mv presentation/pre.pdf pre.fandol.pdf
sed -i 's| fontset=fandol,| fontset=ubuntu,|' presentation/pre.tex
make pdf -C presentation
mv presentation/pre.pdf pre.ubuntu.pdf
- uses: actions/upload-artifact@v3
with:
path: |
main.*.pdf
pre.*.pdf
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
main.*.pdf
pre.*.pdf