This repository has been archived by the owner on Feb 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
circle.yml
49 lines (45 loc) · 1.56 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
46
47
48
49
machine:
node:
version: 7.9.0
dependencies:
pre:
- cd /tmp
- wget https://github.com/gohugoio/hugo/releases/download/v0.22/hugo_0.22_Linux-64bit.deb
- sudo dpkg -i hugo*.deb
- npm install -g gulp
- npm link gulp
- gem install sass
test:
override:
- npm test
deployment:
staging:
branch: master
commands:
- hugo -s ./site -b $HUGO_STAGING_HOST --config=./site/staging.yml -d ../public
- mkdir -p ./public/css
- sass ./assets/sass/main.sass:./public/css/main.css --style compressed --sourcemap=none
- npm install
- gulp
- tar -zcvf public.tar.gz public/
- scp public.tar.gz $DEPLOY_USER@$DEPLOY_STAGING_HOST:$DEPLOY_STAGING_PATH
- ssh -t $DEPLOY_USER@$DEPLOY_STAGING_HOST "
cd $DEPLOY_STAGING_PATH &&
rm -rf public/ &&
tar -xvzf public.tar.gz &&
mkdir public/.well-known"
production:
tag: /v[0-9]+(\.[0-9]+)*/
commands:
- hugo -s ./site -b $HUGO_PRODUCTION_HOST --config=./site/production.yml -d ../public
- mkdir -p ./public/css
- sass ./assets/sass/main.sass:./public/css/main.css --style compressed --sourcemap=none
- npm install
- gulp
- tar -zcvf public-$CIRCLE_TAG.tar.gz public/
- scp public-$CIRCLE_TAG.tar.gz $DEPLOY_USER@$DEPLOY_PRODUCTION_HOST:$DEPLOY_PRODUCTION_PATH
- ssh -t $DEPLOY_USER@$DEPLOY_PRODUCTION_HOST "
cd $DEPLOY_PRODUCTION_PATH &&
rm -rf public/ &&
tar -xvzf public-$CIRCLE_TAG.tar.gz &&
mkdir public/.well-known"