-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
105 lines (98 loc) · 2.83 KB
/
.gitlab-ci.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
image: node:19.2.0-alpine
cache: &global_cache
key:
files:
- schemcat/pnpm-lock.yaml
paths:
- schemcat/node_modules/
- schemcat/.pnpm-store/
policy: pull
schemcat-install:
stage: .pre
cache:
<<: *global_cache
policy: pull-push
before_script:
- apk update && apk add curl
- curl -fsSL "https://github.com/pnpm/pnpm/releases/download/v7.15.0/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
- pnpm config set store-dir .pnpm-store
- cd schemcat
script:
- pnpm install
schemcat-build:
stage: build
cache:
<<: *global_cache
before_script:
- apk update && apk add curl
- curl -fsSL "https://github.com/pnpm/pnpm/releases/download/v7.15.0/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
- pnpm config set store-dir .pnpm-store
- cd schemcat
- pnpm install
script:
- pnpm build
artifacts:
paths:
- schemcat/dist/
expire_in: 7 days
schemcat-test:
stage: test
cache:
<<: *global_cache
before_script:
- apk update && apk add curl
- curl -fsSL "https://github.com/pnpm/pnpm/releases/download/v7.15.0/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
- pnpm config set store-dir .pnpm-store
- cd schemcat
- pnpm install
script:
- pnpm test
schemcat-gh-pages:
stage: deploy
cache:
<<: *global_cache
before_script:
- apk update && apk add curl openssl ca-certificates git
- curl -fsSL "https://github.com/pnpm/pnpm/releases/download/v7.15.0/pnpm-linuxstatic-x64" -o /bin/pnpm; chmod +x /bin/pnpm;
- pnpm config set store-dir .pnpm-store
- cd schemcat
- pnpm i
script:
- pnpm build
- git clone --branch gh-pages --depth 1 https://sorashi:[email protected]/sorashi/schemcat.git
- mkdir schemcat.new
# clean working dir, preserve .git
- cp -a schemcat/.git schemcat.new/.git
- cp -a dist/* schemcat.new/
- cd schemcat.new
- touch .nojekyll
- git config user.email [email protected]
- git config user.name "Dennis Prazak"
- git add -A
# commit only if there are changes
- git diff-index --quiet HEAD || git commit -m "$CI_SERVER_NAME $CI_PIPELINE_ID"
- git push
# deploy to production when a tag is pushed
only: [ tags ]
# ignore all branches except the default branch (i.e. must tag master)
except: [ branches ]
bp-build:
image: aergus/latex:latest
stage: build
before_script:
- cd text/cs
script:
- make all
artifacts:
paths:
- text/cs/prace.pdf
- text/cs/abstrakt-cz.pdf
- text/cs/abstrakt-en.pdf
expire_in: 1 week
bp-verify:
image: ghcr.io/mff-cuni-cz/cuni-thesis-validator:latest
script:
- cd text/cs
- verify prace.pdf | grep 'isCompliant="true"'
- verify abstrakt-cz.pdf | grep 'isCompliant="true"'
- verify abstrakt-en.pdf | grep 'isCompliant="true"'