From d8769ca4408770e941a6c012b5499000907f6962 Mon Sep 17 00:00:00 2001 From: alexander Date: Mon, 19 Jan 2026 00:52:40 +0100 Subject: [PATCH] Update gitea --- .gitea/workflows/build-script.yaml | 29 ++++++++++------------------ compile-all.bash | 31 ------------------------------ 2 files changed, 10 insertions(+), 50 deletions(-) delete mode 100755 compile-all.bash diff --git a/.gitea/workflows/build-script.yaml b/.gitea/workflows/build-script.yaml index fd2bea6..28fe331 100644 --- a/.gitea/workflows/build-script.yaml +++ b/.gitea/workflows/build-script.yaml @@ -17,6 +17,7 @@ jobs: # Run the whole job inside a Docker container that has Typst installed steps: + - uses: typst-community/setup-typst@v4 - name: Checkout repository uses: actions/checkout@v4 with: @@ -27,30 +28,20 @@ jobs: - name: Debug Ls run: ls -la "$PWD" && echo "$PWD && echo ${{ github.workspace }}" - - name: Build Typst builder image - uses: docker/build-push-action@v2 + - name: Compile Analysis 1 with: - tags: typst-builder-image:latest - push: false + working-directory: ${{ env.TYPST_SOURCE_DIR }}/analysis-1 + run: typst compile analysis-1.typ --out-dir "../../${{ env.BUILD_DIR }}" - - name: Compile all .typ files - uses: addnab/docker-run-action@v3 - env: - TYPST_SOURCE_DIR: ${{ env.TYPST_SOURCE_DIR }} - BUILD_DIR: ${{ env.BUILD_DIR }} + - name: Compile Schaltungstheorie 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" + working-directory: ${{ env.TYPST_SOURCE_DIR }}/schaltungstheorie + run: typst compile schaltungstheorie.typ --out-dir "../../${{ env.BUILD_DIR }}" - - name: Upload PDFs - if: always() - uses: actions/upload-artifact@v3 + - name: Compile LinAlg with: - name: typst-pdfs - path: ${{ env.BUILD_DIR }}/*.pdf - if-no-files-found: warn + working-directory: ${{ env.TYPST_SOURCE_DIR }}/linAlg + run: typst compile LinearAlgebra.typ --out-dir "../../${{ env.BUILD_DIR }}" - name: Create Gitea Release uses: softprops/action-gh-release@v1 diff --git a/compile-all.bash b/compile-all.bash deleted file mode 100755 index f307d35..0000000 --- a/compile-all.bash +++ /dev/null @@ -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//.pdf - dest_pdf="${OUT_DIR}/$(basename "${rel%.typ}").pdf" - - echo "Compiling: $f -> $dest_pdf" - typst compile "$f" "$dest_pdf" -done