-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
59 lines (47 loc) · 1.2 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
stages:
- build
- pages
publish:
stage: build
image: registry.gitlab.com/contentascode/activist-apprentice:v0.0.10
cache:
paths:
- node_modules/
before_script:
- mkdir ~/workspace && cd ~/workspace
- apprentice init --non-interactive
- apprentice config
# Manually template with current course
- rm -rf ~/.content/packages/activist-apprentice-course-template
- cp -R $CI_PROJECT_DIR ~/.content/packages/activist-apprentice-course-template
- cd ~/.content/packages/activist-apprentice-course-template
- npm install
script:
# Build website
- cd ~/workspace
- apprentice start --clean --no-watch --baseurl /$CI_PROJECT_NAME preview
- apprentice start --clean --no-watch mobile
- cd ~/.content/build/@apprentice/mobile
- more package.json
- more app.json
# - npm install
- npm install -g exp
- exp login -u $EXP_LOGIN -p $EXP_PASS
- exp publish --non-interactive
- cd ~
- cp -R ~/.content/build/@apprentice/preview $CI_PROJECT_DIR/public
- ls -la $CI_PROJECT_DIR/public
artifacts:
paths:
- public
only:
- master
pages:
stage: pages
script:
- echo "Deploying to gitlab pages"
artifacts:
paths:
- public
only:
- master