-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.46 KB
/
main.yml
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
name: Check and generate markdown and PDF files for mmul project
env:
KPA_PROJECT: kpa-mmul
on: [push]
jobs:
lint:
runs-on: ubuntu-latest
container:
image: ghcr.io/mmul-it/kpa:v1.0.0
options: --user root
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create symlink to workspace
run: ln -sf /__w/kpa-mmul/kpa-mmul /kpa/projects/${KPA_PROJECT}
- name: Check project yamls
run: yamllint -s /kpa/projects/${KPA_PROJECT}/*.yml
- name: Check markdown files for example project
run: mdl /kpa/projects/${KPA_PROJECT}/contents/*.md
generate:
runs-on: ubuntu-latest
container:
image: ghcr.io/mmul-it/kpa:v1.0.0
options: --user root
needs: lint
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Create symlink to workspace
run: ln -sf /__w/kpa-mmul/kpa-mmul /kpa/projects/${KPA_PROJECT}
- name: Generate files
run: for DOC in $(ls /kpa/projects/${KPA_PROJECT}/*.yml); do
echo "Processing $(basename ${DOC})";
/kpa/kpa.sh -p ${KPA_PROJECT} -y $(basename ${DOC});
done
- name: Upload markdown files
uses: actions/upload-artifact@v3
with:
name: markdowns
path: /kpa/output/**.md
- name: Upload pdf files
uses: actions/upload-artifact@v3
with:
name: pdfs
path: /kpa/output/**.pdf