-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
45 lines (44 loc) · 1.45 KB
/
circle.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
machine:
node:
version: 7.7.3
dependencies:
cache_directories:
- "~/.stack"
- "frontend/output"
- "frontend/bower_components"
- "frontend/.pulp-cache"
pre:
- curl -sSL https://get.haskellstack.org/ | sh
- stack setup
- npm install -g [email protected] pulp bower
override:
- stack install --only-dependencies --no-terminal
- bower install:
pwd: frontend
- pulp build --src-path fake-src:
pwd: frontend
compile:
override:
- stack build
- mkdir dist; pulp browserify -O > dist/app.js:
pwd: frontend
- pulp browserify --src-path homesrc -O > dist/home.js:
pwd: frontend
test:
override:
- echo "You pass."
deployment:
stage:
branch: master
commands:
- "scp -q -r -P $SSH_DEPLOY_PORT frontend/dist $SSH_DEPLOY_HOST:stage/frontend/"
- "scp -q -r -P $SSH_DEPLOY_PORT static $SSH_DEPLOY_HOST:stage/"
- "scp -q -r -P $SSH_DEPLOY_PORT $(stack path --local-install-root)/bin/oak $SSH_DEPLOY_HOST:oak-stage"
- ssh -p $SSH_DEPLOY_PORT [email protected] 'sh deploy.sh stage'
live:
branch: production
commands:
- "scp -q -r -P $SSH_DEPLOY_PORT frontend/dist $SSH_DEPLOY_HOST:live/frontend/"
- "scp -q -r -P $SSH_DEPLOY_PORT static $SSH_DEPLOY_HOST:live/"
- "scp -q -r -P $SSH_DEPLOY_PORT $(stack path --local-install-root)/bin/oak $SSH_DEPLOY_HOST:oak-live"
- ssh -p $SSH_DEPLOY_PORT [email protected] 'sh deploy.sh live'