-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwercker.yml
88 lines (80 loc) · 2.63 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# This references the default nodejs container from
# the Docker Hub: https://registry.hub.docker.com/_/node/
# If you want Nodesource's container you would reference nodesource/node
# Read more about containers on our dev center
# http://devcenter.wercker.com/docs/containers/index.html
box: node
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
# services:
# - postgres
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongo
# http://devcenter.wercker.com/docs/services/mongodb.html
build:
steps:
- npm-install
- script:
name: echo things
code: |
echo $GET_CURRENT_WEEKS_ARTICLES_ONLY
echo $TEST_VALUE
env
generate:
# The steps that will be executed to generate or regenerate the web pages
steps:
- script:
name: generate weekly pages
code: |
npm install gatsby-cli -g
echo $GET_CURRENT_WEEKS_ARTICLES_ONLY
echo $TEST_VALUE
env
gatsby build --prefix-paths
deploy:
# The steps that will be executed on deploy
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# deploy to azure
- wercker-labs/azure-ftp-deploy:
cwd: public/
publish-url: $publish_url
username: $username
password: $password
after-steps:
- kobim/notify-pushover:
token: $PUSHOVER_APP_TOKEN
user: $PUSHOVER_USER_TOKEN
title: Deployed Weekly Digest
screenshot:
# take a screenshot and ftp to site folder for twitter/facebook cards
box: markxnelson/phantomjs
steps:
- script:
code: |
export SCREENSHOT_URL="https://conradj.co.uk/weeklyreads/$(date -dlast-sunday +%s)/summary"
export SCREENSHOT_FILENAME="public/screenshots/$(date -dlast-sunday +%s).png"
- screenshot:
url: $SCREENSHOT_URL
filename: $SCREENSHOT_FILENAME
create_file_in_artifacts: false
viewport_width: 1000
viewport_height: 500
deploy-screenshot:
steps:
# deploy to azure
- wercker-labs/azure-ftp-deploy:
cwd: public/screenshots/
publish-url: $publish_url
username: $username
password: $password
after-steps:
- kobim/notify-pushover:
token: $PUSHOVER_APP_TOKEN
user: $PUSHOVER_USER_TOKEN
title: Updated Screenshot