Compare commits

..

7 Commits

Author SHA1 Message Date
alexander
6dfe3998e1 a
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 10s
2026-01-19 01:08:41 +01:00
alexander
421ddd1f6d aaaa
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 10s
2026-01-19 01:06:07 +01:00
alexander
ecdc00b4b2 moved more around
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 11s
2026-01-19 01:04:12 +01:00
alexander
8b24c9ea8e a
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 9s
2026-01-19 00:58:42 +01:00
alexander
740384a433 Moved names arround
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 9s
2026-01-19 00:57:27 +01:00
alexander
0f9aed8b07 ci/Cd
All checks were successful
Build Typst PDFs (Docker) / build-typst (push) Successful in 10s
2026-01-19 00:54:41 +01:00
alexander
d8769ca440 Update gitea
Some checks failed
Build Typst PDFs (Docker) / build-typst (push) Failing after 12s
2026-01-19 00:52:40 +01:00
6 changed files with 4155 additions and 67 deletions

View File

@@ -7,16 +7,13 @@ on:
pull_request: pull_request:
branches: [ "**" ] branches: [ "**" ]
env:
TYPST_SOURCE_DIR: src
BUILD_DIR: build
jobs: jobs:
build-typst: build-typst:
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Run the whole job inside a Docker container that has Typst installed # Run the whole job inside a Docker container that has Typst installed
steps: steps:
- uses: typst-community/setup-typst@v4
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
@@ -27,38 +24,25 @@ jobs:
- name: Debug Ls - name: Debug Ls
run: ls -la "$PWD" && echo "$PWD && echo ${{ github.workspace }}" run: ls -la "$PWD" && echo "$PWD && echo ${{ github.workspace }}"
- name: Build Typst builder image - name: Make build directory
uses: docker/build-push-action@v2 run: mkdir -p build
with:
tags: typst-builder-image:latest
push: false
- name: Compile all .typ files - name: Compile Analysis1
uses: addnab/docker-run-action@v3 continue-on-error: true
env: run: typst compile --root src src/cheatsheets/Analysis1.typ build/Analysis1.pdf
TYPST_SOURCE_DIR: ${{ env.TYPST_SOURCE_DIR }}
BUILD_DIR: ${{ env.BUILD_DIR }}
with:
image: typst-builder-image:latest
options: --volumes-from=${{ env.JOB_CONTAINER_NAME }}
cwd: ${{ github.workspace }}
run: "cd ${{ github.workspace }} && TYPST_SOURCE_DIR=${{ env.TYPST_SOURCE_DIR }} BUILD_DIR=${{ env.BUILD_DIR }} bash -c ./compile-all.bash"
- name: Upload PDFs - name: Compile Schaltungstheorie
if: always() continue-on-error: true
uses: actions/upload-artifact@v3 run: typst compile --root src src/cheatsheets/Schaltungstheorie.typ build/Schaltungstheorie.pdf
with:
name: typst-pdfs - name: Compile LinAlg
path: ${{ env.BUILD_DIR }}/*.pdf continue-on-error: true
if-no-files-found: warn run: typst compile --root src src/cheatsheets/LinearAlgebra.typ build/LinearAlgebra.pdf
- name: Create Gitea Release - name: Create Gitea Release
uses: softprops/action-gh-release@v1 continue-on-error: true
uses: akkuman/gitea-release-action@v1
with: with:
tag_name: ${{ steps.tag.outputs.tag }} name: "Formelsammlungen PDFs"
name: Typst PDFs ${{ steps.tag.outputs.tag }} tag_name: "latest"
body: | files: build/*.pdf
Automated release of Typst-generated PDFs.
Commit: ${{ github.sha }}
files: ${{ env.BUILD_DIR }}/*.pdf

4135
build/Analysis1.pdf Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,31 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
SRC_DIR="${TYPST_SOURCE_DIR}"
OUT_DIR="${BUILD_DIR}"
if [[ ! -d "$SRC_DIR" ]]; then
echo "Source directory '$SRC_DIR' does not exist."
exit 1
fi
mkdir -p "$OUT_DIR"
# Find all .typ files under $SRC_DIR (excluding hidden dirs)
mapfile -d '' files < <(printf '%s\0' "$SRC_DIR"/*.typ 2>/dev/null)
if [[ ${#files[@]} -eq 0 ]]; then
echo "No .typ files found in '$SRC_DIR'."
exit 0
fi
for f in "${files[@]}"; do
# Trim leading ./ if present
rel="${f#./}"
# Destination path: build/<same-subdirs>/<filename>.pdf
dest_pdf="${OUT_DIR}/$(basename "${rel%.typ}").pdf"
echo "Compiling: $f -> $dest_pdf"
typst compile "$f" "$dest_pdf"
done

View File

@@ -1,7 +1,7 @@
#import "@preview/biceps:0.0.1" : * #import "@preview/biceps:0.0.1" : *
#import "@preview/mannot:0.3.1" #import "@preview/mannot:0.3.1"
#import "lib/styles.typ" : * #import "../lib/styles.typ" : *
#import "lib/common_rewrite.typ" : * #import "../lib/common_rewrite.typ" : *
#set page( #set page(
paper: "a4", paper: "a4",