generated from greimel/pluto-course-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
36 lines (35 loc) · 859 Bytes
/
.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
julia:
stage: build
image: julia:1
script:
- cd generate
# Save create package environment from notebook
# (write_nb_to_dir modifies changes the cell order
# if macros are involved hence we want to call it
# on a copy of the notebook)
- cp generate.jl generate2.jl
- julia -e '
import Pkg;
Pkg.add("Pluto"); import Pluto;
Pluto.PkgUtils.write_nb_to_dir("./generate2.jl", ".")'
# generate website
- julia --project=. -e '
import Pkg;
Pkg.instantiate();
include("generate.jl")'
- cd ..
artifacts:
paths:
- website/__site
cache:
paths:
- pluto_state_cache
pages:
stage: deploy
script:
- mv ./website/__site public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH