diff --git a/.devcontainer/Containerfile b/.devcontainer/Containerfile deleted file mode 100644 index be9f2d0..0000000 --- a/.devcontainer/Containerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/base:alpine -RUN apk add typst -RUN mkdir -p /fonts -RUN wget -O /fonts/ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf -RUN wget -O /fonts/ubuntu-italic.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-italic.ttf -RUN wget -O /fonts/ubuntu-bold.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-700-normal.ttf -RUN wget -O /fonts/noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf -RUN wget -O /fonts/noto-italic.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-italic.ttf -RUN wget -O /fonts/noto-bold.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-700-normal.ttf -ENV TYPST_FONT_PATHS=/fonts \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 2f504f2..2f46afd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,9 +1,16 @@ { "name": "documents", - "build": { - "dockerfile": "Containerfile" + "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "features": { + "ghcr.io/michidk/devcontainers-features/typst": {}, + "ghcr.io/rocker-org/devcontainer-features/apt-packages": { + "packages": "fonts-noto-core,fonts-ubuntu" + } }, "containerUser": "vscode", + "containerEnv": { + "TYPST_FONT_PATHS": "/usr/share/fonts" + }, "runArgs": [ "--userns=keep-id", "--security-opt=label=disable" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 57075d6..dbc3ca9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,17 +9,32 @@ jobs: deploy: name: 🚢 Deploy runs-on: ubuntu-latest + env: + TYPST_FONT_PATHS: /usr/share/fonts steps: - uses: actions/checkout@v4 + - run: sudo apt install -y fonts-noto-core fonts-ubuntu + + - uses: typst-community/setup-typst@v3 + - run: typst c 3d-druck-agb.typ + - run: typst c beitragsordnung.typ + - run: typst c beleg.typ + - run: typst c datenschutz.typ + - run: typst c haftungsausschluss.typ + - run: typst c mtgliedsantrag.typ + - run: typst c satzung.typ + - run: typst c werkstatt-agb.typ + - run: typst c werkstatt-regeln.typ - name: build containerfile id: build-image uses: redhat-actions/buildah-build@v2 with: image: ghcr.io/swablab/documents + base-image: scratch tags: latest - containerfiles: | - ./Containerfile + content: | + *.pdf - name: Log in to ghcr.io uses: redhat-actions/podman-login@v1 diff --git a/Containerfile b/Containerfile deleted file mode 100644 index 0bd7bdc..0000000 --- a/Containerfile +++ /dev/null @@ -1,25 +0,0 @@ -FROM docker.io/alpine:latest AS build -RUN apk add typst -RUN mkdir -p /fonts -RUN wget -O /fonts/ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf -RUN wget -O /fonts/ubuntu-italic.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-italic.ttf -RUN wget -O /fonts/ubuntu-bold.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-700-normal.ttf -RUN wget -O /fonts/noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf -RUN wget -O /fonts/noto-italic.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-italic.ttf -RUN wget -O /fonts/noto-bold.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-700-normal.ttf -ENV TYPST_FONT_PATHS=/fonts - -WORKDIR /app -COPY . . -RUN typst c 3d-druck-agb.typ -RUN typst c beitragsordnung.typ -RUN typst c beleg.typ -RUN typst c datenschutz.typ -RUN typst c haftungsausschluss.typ -RUN typst c mitgliedsantrag.typ -RUN typst c satzung.typ -RUN typst c werkstatt-agb.typ -RUN typst c werkstatt-regeln.typ - -FROM scratch -COPY --from=build /app/*.pdf / \ No newline at end of file