forked from kisom/kyleisom.net
-
Notifications
You must be signed in to change notification settings - Fork 3
/
wercker.yml
65 lines (56 loc) · 1.9 KB
/
wercker.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
60
61
62
63
64
65
box: wercker/ruby
build:
steps:
# Install dependencies
- bundle-install
# Execute jeykyll doctor command to validate the
# site against a list of known issues.
- script:
name: jekyll doctor
code: bundle exec jekyll doctor
- script:
name: sass compile
code: |-
mkdir -p 'assets/css/'
bundle exec sass --style compressed assets/scss/styles.scss:assets/css/styles.min.css --debug-info
# Generate staging, no drafts in here
- script:
name: generate staging site
code: |-
bundle exec jekyll build --trace
- script:
name: copy site output
code: |-
# Copy site to output directory for staging and production
mkdir "$WERCKER_OUTPUT_DIR/staging"
cp --recursive _site/* "$WERCKER_OUTPUT_DIR/staging/"
mkdir "$WERCKER_OUTPUT_DIR/production"
cp --recursive _site/* "$WERCKER_OUTPUT_DIR/production/"
# Copy post deploy script because it will not be copied automaticly
# since we write to the wercker output directory.
cp "post-deploy-tests.sh" "$WERCKER_OUTPUT_DIR/post-deploy-tests.sh"
- create-file:
name: generate staging robots.txt
filename: $WERCKER_OUTPUT_DIR/staging/robots.txt
content: |-
# Go away! This is a staging version
# of born2code.net, no need to index it.
User-agent: *
Disallow: /
- create-file:
name: generate production robots.txt
filename: $WERCKER_OUTPUT_DIR/production/robots.txt
content: |-
User-agent: *
Allow: /
Sitemap: http://born2code.net/sitemap.xml
deploy:
steps:
- s3sync:
key-id: $KEY
key-secret: $SECRET
bucket-url: $BUCKET
source-dir: $SOURCE
- script:
name: Execute post deploy tests
code: source post-deploy-tests.sh