-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (55 loc) · 1.48 KB
/
integration.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Build Typst document (CI)
on:
push:
paths:
- '**/*.typ'
- '**/*.yaml'
- '**/*.toml'
workflow_dispatch:
paths:
- '**/*.typ'
- '**/*.yaml'
- '**/*.toml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: typst-community/setup-typst@v3
with:
version: latest
- name: Delete samples
run: |
rm -rf ./examples/*.pdf
- name: List Files
id: file-list
shell: bash
run: |
list=$(ls -1 ./examples/*.typ);
file_list=$(echo "$list" | sed ':a;N;$!ba;s/\n/ /g')
echo "File List: $file_list"
echo "file_list=$file_list" >> $GITHUB_OUTPUT
- name: Compile Typst to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: ${{ steps.file-list.outputs.file_list }}
root_path: '.'
- name: Delete samples
run: |
rm -rf ./doc/*.pdf
- name: Compile documentation to PDF
uses: mkpoli/compile-typst-action@main
with:
source_paths: "doc/manual.typ"
root_path: '.'
- name: Upload examples PDF file
uses: actions/upload-artifact@v3
with:
name: examples-g-exam
path: ./examples/*.pdf
- name: Upload documentation PDF file
uses: actions/upload-artifact@v3
with:
name: document-g-exam
path: ./doc/*.pdf