45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
# .gitea/workflows/typst-build.yml
|
|
name: Build Typst PDFs (Docker)
|
|
|
|
on:
|
|
push:
|
|
branches: [ "**" ]
|
|
pull_request:
|
|
branches: [ "**" ]
|
|
|
|
env:
|
|
TYPST_SOURCE_DIR: src
|
|
BUILD_DIR: build
|
|
|
|
jobs:
|
|
build-typst:
|
|
runs-on: ubuntu-latest
|
|
|
|
# Run the whole job inside a Docker container that has Typst installed
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
submodules: false
|
|
lfs: false
|
|
|
|
- name: Debug Ls
|
|
run: ls -la "$PWD" && echo "$PWD && echo $GITEA_WORK_DIR"
|
|
|
|
- name: Compile all .typ files
|
|
uses: addnab/docker-run-action@v3
|
|
with:
|
|
image: ghcr.io/typst/typst:0.14.2
|
|
options: -v ${GITEA_WORK_DIR}:/workspace -w /workspace
|
|
run: "TYPST_SOURCE_DIR=${{ env.TYPST_SOURCE_DIR }} BUILD_DIR=${{ env.BUILD_DIR }} ls -laF"
|
|
|
|
|
|
- name: Upload PDFs
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: typst-pdfs
|
|
path: ${{ env.BUILD_DIR }}/
|
|
if-no-files-found: warn
|