This commit is contained in:
45
.gitea/workflows/build-pdf.yaml
Normal file
45
.gitea/workflows/build-pdf.yaml
Normal file
@@ -0,0 +1,45 @@
|
||||
name: Build Typst PDF
|
||||
run-name: Build PDF for ${{ gitea.actor }} on master
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install FiraCode Nerd Font
|
||||
run: |
|
||||
mkdir -p fonts
|
||||
wget -qO FiraCode.zip https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FiraCode.zip
|
||||
unzip -q FiraCode.zip -d fonts
|
||||
|
||||
- name: Install Typst CLI
|
||||
run: |
|
||||
# Download the latest CLI binary for Linux
|
||||
wget -qO- https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz | tar -xJ
|
||||
|
||||
# Move binary to path (assuming standard Linux runner)
|
||||
mv typst-x86_64-unknown-linux-musl/typst /usr/local/bin/typst
|
||||
chmod +x /usr/local/bin/typst
|
||||
|
||||
- name: Run Build Script
|
||||
# We set the Environment Variable TYPST_FONT_PATHS so Typst knows where to look
|
||||
env:
|
||||
TYPST_FONT_PATHS: ./fonts
|
||||
run: |
|
||||
chmod +x build.sh
|
||||
./build.sh
|
||||
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mathe-merkblaetter
|
||||
# Your script outputs to the ./build directory
|
||||
path: build/*.pdf
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user