diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..aca35e1 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,24 @@ +name: Build PDFs + +on: + push: + branches: + - main + +jobs: + deploy: + name: 🚢 Deploy + runs-on: ubuntu-latest + steps: + - uses: docker/setup-buildx-action@v3 + - uses: actions/checkout@v4 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - uses: docker/build-push-action@v6 + with: + file: Containerfile + push: true + tags: ghcr.io/swablab/documents:latest diff --git a/.gitignore b/.gitignore index a2ad2d1..3b742f0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.pdf *.yml -*.png \ No newline at end of file +*.png +!.github/** \ No newline at end of file diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..62d6f83 --- /dev/null +++ b/Containerfile @@ -0,0 +1,19 @@ +FROM docker.io/alpine:latest AS build +RUN apk add typst +RUN mkdir -p /root/.local/share/fonts +RUN wget -O /root/.local/share/fonts/ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf +RUN wget -O /root/.local/share/fonts/noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf + +COPY . . +RUN typst c 3d-druck-agb.typ +RUN typst c beitragsordnung.typ +RUN typst c beitrittserklärung.typ +RUN typst c beleg.typ +RUN typst c datenschutz-einwilligung.typ +RUN typst c haftungsausschluss.typ +RUN typst c satzung.typ +RUN typst c werkstatt-agb.typ +RUN typst c werkstatt-regeln.typ + +FROM scratch +COPY --from=build *.pdf / \ No newline at end of file