Skip to content

GitHub Actions修正 #28

GitHub Actions修正

GitHub Actions修正 #28

Workflow file for this run

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
- 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: Install Typst
uses: typst-community/setup-typst@v3
- name: Typst (卒論・修論)
run: typst compile 卒論・修論用/main.typ --font-path $GITHUB_WORKSPACE/downloads/fonts
- name: Typst (リアペ・レポート)
run: typst compile リアペ・レポート用/main.typ --font-path $GITHUB_WORKSPACE/downloads/fonts
- name: Upload PDF file
uses: actions/upload-artifact@v4
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"