forked from eclipse-che/blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.devfile.yaml
58 lines (57 loc) · 1.48 KB
/
.devfile.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
schemaVersion: 2.2.0
metadata:
name: che-blog
components:
- name: jekyll
container:
image: quay.io/eclipse/che-blog:next
memoryLimit: 4Gi
cpuLimit: '2'
memoryRequest: 1Gi
cpuRequest: 500m
endpoints:
- exposure: public
name: live-reload
protocol: https
targetPort: 35729
- exposure: public
name: jekyll
protocol: https
targetPort: 4000
commands:
- id: bundle-install
exec:
label: 0. Install Gemfile dependencies
component: jekyll
commandLine: bundle install --gemfile=${PROJECT_SOURCE}/Gemfile
group:
kind: build
isDefault: true
- id: start-jekyll-server
exec:
label: 1. Start the jekyll based blog server
component: jekyll
commandLine: bundle exec jekyll serve --watch --host 0.0.0.0 --future
group:
kind: run
isDefault: true
- id: jekyll-clean
exec:
component: jekyll
commandLine: bundle exec jekyll clean
group:
kind: build
isDefault: false
- id: publish-blog-to-surge
exec:
component: jekyll
commandLine: |
read -p "ENTER your GitHub login to customize the URL: " GH_LOGIN &&
read -p "ENTER a surge.sh token: " SURGE_TOKEN &&
export SURGE_TOKEN &&
export GH_LOGIN &&
npm install -g surge &&
surge ./_site --domain https://pr-${GH_LOGIN}-che-blog.surge.sh
events:
postStart:
- bundle-install