Dateien
FoxMesh/.gitea/workflows/build-pdf.yml
T
tom 807621b92c
Build and Release Typst PDF / build-pdf (push) Failing after 2s
Build of FoxMesh / build-and-test (push) Canceled after 2m14s
.gitea/workflows/build-pdf.yml aktualisiert
2026-10-22 23:40:56 +02:00

64 Zeilen
2.1 KiB
YAML

name: Build and Release Typst PDF
on:
push:
branches:
- main
tags:
- 'v*' # Triggers when a release tag like v1.0.0 is pushed
workflow_dispatch: # Enables manual start in the Web interface
jobs:
build-pdf:
runs-on: host
steps:
# 1. Checkout the source code from Git
- name: Checkout Repository
uses: actions/checkout@v4
# 2. Download and extract the latest Typst Binary (No installation required)
- name: Download Latest Typst
run: |
cd docs/lora/
XZ_FILE=$(curl -s https://api.github.com/repos/typst/typst/releases/latest | jq -r '.assets[] | select(.name | endswith("x86_64-unknown-linux-musl.tar.xz")) | .browser_download_url')
curl -L -o typst.tar.xz "XZ_FILE"
ls -la
tar -xJf typst.tar.xz --strip-components=1
chmod +x ./typst
# 3. Compile the PDF using the local binary
- name: Compile Typst Documents
run: |
cd docs/lora/
ls -la
./typst compile foxmesh-protocol.typ FoxMesh_Protocol.pdf
./typst compile foxmesh-protocol_de.typ FoxMesh_Protocol_de.pdf
# 3. Upload PDF as a Gitea artifact (runs on every push to main)
- name: Upload PDF Artifact
uses: actions/upload-artifact@v7
with:
name: foxmesh-protocol-pdf
path: docs/lora/FoxMesh_Protocol.pdf
retention-days: 14
archive: false
- name: Upload PDF Artifact de
uses: actions/upload-artifact@v7
with:
name: foxmesh-protocol-de-pdf
path: docs/lora/FoxMesh_Protocol_de.pdf
retention-days: 14
archive: false
# 4. Optional: PDF direkt an ein Gitea-Release anhängen (wenn ein Tag gepusht wird)
# - name: Upload to Gitea Release
# if: startsWith(github.ref, 'refs/tags/')
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# file: FoxMesh_Engineering_Manual.pdf
# asset_name: FoxMesh_Engineering_Manual.pdf
# tag: ${{ github.ref }}
# overwrite: true