Added a build script
Some checks failed
Build Typst PDFs (Docker) / build-typst (push) Failing after 31s
Some checks failed
Build Typst PDFs (Docker) / build-typst (push) Failing after 31s
This commit is contained in:
46
.gitea/workflows/build-script.yaml
Normal file
46
.gitea/workflows/build-script.yaml
Normal file
@@ -0,0 +1,46 @@
|
||||
# .gitea/workflows/typst-build.yml
|
||||
name: Build Typst PDFs (Docker)
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Change this to the folder that contains your .typ files (relative to repo root)
|
||||
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
|
||||
container:
|
||||
image: ghcr.io/typst/typst:latest
|
||||
options: --user root
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Show Typst & OS versions
|
||||
run: |
|
||||
typst --version || true
|
||||
uname -a
|
||||
|
||||
- name: Compile all .typ files
|
||||
shell: bash
|
||||
run: |
|
||||
TYPST_SOURCE_DIR="${TYPST_SOURCE_DIR}"
|
||||
BUILD_DIR="${BUILD_DIR}"
|
||||
./compile-all.bash
|
||||
|
||||
- name: Upload PDFs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: typst-pdfs
|
||||
path: ${{ env.BUILD_DIR }}/
|
||||
if-no-files-found: warn
|
||||
Reference in New Issue
Block a user