update: 卒論・修論用 #24
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 Typst document | |
on: [push, workflow_dispatch] | |
jobs: | |
build-thesis-template: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Create directory | |
run: | | |
mkdir -p $GITHUB_WORKSPACE/downloads/fonts | |
mkdir -p $GITHUB_WORKSPACE/downloads/typst | |
- name: Install Japanese fonts (apt), Typst and other depdnencies | |
run: | | |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections | |
sudo apt-get update && sudo apt-get install -y fonts-noto fonts-ipafont ttf-mscorefonts-installer wget unzip xz-utils | |
fc-cache -fv | |
cd $GITHUB_WORKSPACE/downloads | |
wget "https://github.com/typst/typst/releases/download/v0.10.0/typst-x86_64-unknown-linux-musl.tar.xz" | |
xz -dc typst-x86_64-unknown-linux-musl.tar.xz | tar xfv - | |
cd - | |
mv $GITHUB_WORKSPACE/downloads/typst-x86_64-unknown-linux-musl/typst . | |
- name: Install Japanese fonts (zip) | |
run: | | |
cd $GITHUB_WORKSPACE/downloads | |
wget "https://github.com/yuru7/udev-gothic/releases/download/v1.3.1/UDEVGothic_v1.3.1.zip" | |
unzip UDEVGothic_v1.3.1.zip -d ./fonts/UDEVGothic | |
wget "https://github.com/adobe-fonts/source-han-serif/releases/download/2.002R/12_SourceHanSerifJP.zip" | |
unzip 12_SourceHanSerifJP.zip -d ./fonts/SourceHanSerifJP | |
- name: Typst | |
run: | | |
./typst fonts --font-path $GITHUB_WORKSPACE/downloads/fonts | |
./typst compile --font-path $GITHUB_WORKSPACE/downloads/fonts 卒論・修論用/main.typ | |
./typst compile --font-path $GITHUB_WORKSPACE/downloads/fonts リアペ・レポート用/main.typ | |
- name: Upload PDF file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: PDF | |
path: "*.pdf" | |
- name: Clean up | |
run: rm -rf $GITHUB_WORKSPACE/downloads && rm -rf typst | |
- name: Git Auto Commit | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "[CI] Auto-compiled to PDF" |