This commit is contained in:
parent
56dcff85db
commit
9f9090e5b8
4 changed files with 42 additions and 52 deletions
25
.forgejo/workflows/deploy.yml
Normal file
25
.forgejo/workflows/deploy.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: deploy
|
||||
on: [push, workflow_dispatch]
|
||||
|
||||
env:
|
||||
STORAGE_DRIVER: vfs
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: deploy
|
||||
runs-on: docker
|
||||
container:
|
||||
image: quay.io/buildah/stable:latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: download
|
||||
run: curl ${{ github.server_url }}/${{ github.repository }}/archive/main.tar.gz | tar -xz
|
||||
|
||||
- name: login
|
||||
run: buildah login -u token -p ${{ secrets.SWABLAB_ORGA_PACKAGE_TOKEN }} git.swablab.de
|
||||
|
||||
- name: build
|
||||
run: buildah build -f documents/Containerfile -t git.swablab.de/${{ github.repository }}:latest documents
|
||||
|
||||
- name: push
|
||||
run: buildah push git.swablab.de/${{ github.repository }}:latest
|
51
.github/workflows/main.yml
vendored
51
.github/workflows/main.yml
vendored
|
@ -1,51 +0,0 @@
|
|||
name: Build PDFs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
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 mitgliedsantrag.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
|
||||
content: |
|
||||
*.pdf
|
||||
|
||||
- name: Log in to ghcr.io
|
||||
uses: redhat-actions/podman-login@v1
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: ghcr.io
|
||||
|
||||
- name: Push to ghcr.io
|
||||
uses: redhat-actions/push-to-registry@v2
|
||||
with:
|
||||
image: ${{ steps.build-image.outputs.image }}
|
||||
tags: ${{ steps.build-image.outputs.tags }}
|
||||
registry: ghcr.io
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,4 +1,4 @@
|
|||
*.pdf
|
||||
*.yml
|
||||
*.png
|
||||
!.github/**
|
||||
!.forgejo/**
|
16
Containerfile
Normal file
16
Containerfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
FROM docker.io/library/alpine AS build
|
||||
ENV TYPST_FONT_PATHS=.
|
||||
RUN wget -O ubuntu.ttf https://cdn.jsdelivr.net/fontsource/fonts/ubuntu@latest/latin-400-normal.ttf &&\
|
||||
wget -O noto.ttf https://cdn.jsdelivr.net/fontsource/fonts/noto-sans@latest/latin-400-normal.ttf
|
||||
RUN typst c 3d-druck-agb.typ &&\
|
||||
typst c beitragsordnung.typ &&\
|
||||
typst c beleg.typ &&\
|
||||
typst c datenschutz.typ &&\
|
||||
typst c haftungsausschluss.typ &&\
|
||||
typst c mitgliedsantrag.typ &&\
|
||||
typst c satzung.typ &&\
|
||||
typst c werkstatt-agb.typ &&\
|
||||
typst c werkstatt-regeln.typ
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build *.pdf .
|
Loading…
Add table
Reference in a new issue