Compare commits
12 Commits
b16009f62a
...
latest
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6dfe3998e1 | ||
|
|
421ddd1f6d | ||
|
|
ecdc00b4b2 | ||
|
|
8b24c9ea8e | ||
|
|
740384a433 | ||
|
|
0f9aed8b07 | ||
|
|
d8769ca440 | ||
|
|
6cdd323198 | ||
|
|
d3c51d5ee7 | ||
|
|
ae64e72fd4 | ||
|
|
db9a34579f | ||
|
|
3eac461f7a |
@@ -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
|
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1 +1,7 @@
|
|||||||
venv
|
.venv
|
||||||
|
out
|
||||||
|
node_modules
|
||||||
|
__pycache__/
|
||||||
|
|
||||||
|
package-lock.json
|
||||||
|
package.json
|
||||||
17
.vscode/tasks.json
vendored
17
.vscode/tasks.json
vendored
@@ -1,17 +0,0 @@
|
|||||||
{
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "Compile All",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "TYPST_SOURCE_DIR=src BUILD_DIR=output ./compile-all.bash",
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
},
|
|
||||||
"problemMatcher": [],
|
|
||||||
"options": {
|
|
||||||
"cwd": "${workspaceFolder}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
4135
build/Analysis1.pdf
Normal file
4135
build/Analysis1.pdf
Normal file
File diff suppressed because one or more lines are too long
@@ -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
|
|
||||||
7086
out/Analysis1.pdf
7086
out/Analysis1.pdf
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -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",
|
||||||
Reference in New Issue
Block a user