This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.drone.yml
95 lines (88 loc) · 2.58 KB
/
.drone.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
89
90
91
92
93
94
95
pipeline:
dependencies:
image: node:erbium
commands:
- ./scripts/check-lockfile.sh
lint:
group: tests
image: node:erbium
commands:
- yarn lint && yarn pretty:check
jest:
group: tests
image: node:erbium
commands:
- yarn jest
check-build:
image: node:erbium
secrets: [gh_token]
commands: node scripts/failcheck.js
when:
status: [success, failure]
deploy-twigjs-preview:
group: previews
image: node:erbium
secrets: [gh_token, netlify_auth_token, netlify_js_site_id]
commands:
- yarn twing:clean
- yarn twing:dist
- 'yarn netlify deploy --site $${NETLIFY_JS_SITE_ID} --alias ${DRONE_COMMIT_BRANCH} --message "Drone build: ${CI_BUILD_NUMBER}"'
- node scripts/set-netlify-deployment-status.js
environment:
- DEPLOY_CONTEXT=preview/twig-js
when:
event: push
status: [success, failure]
branch:
exclude:
- master
deploy-prod-js:
image: node:erbium
secrets: [gh_token, netlify_auth_token, netlify_js_site_id]
commands:
- yarn twing:clean
- yarn twing:dist
- 'yarn netlify deploy --prod --site $${NETLIFY_JS_SITE_ID} --message "Drone build: ${CI_BUILD_NUMBER}"'
- node scripts/set-netlify-deployment-status.js
environment:
- DEPLOY_CONTEXT=preview/twig-js
when:
branch: master
event: push
deploy-prod-php:
image: roelofr/php-node
secrets: [gh_token, netlify_auth_token, netlify_php_site_id]
commands:
- npm install -g n && n stable
- yarn install
- rm -rf netlify.toml
- yarn php:install
- yarn php:dist
- 'yarn netlify deploy --prod --dir=php/dist --site $${NETLIFY_PHP_SITE_ID} --message "Drone build: ${CI_BUILD_NUMBER}"'
- node scripts/set-netlify-deployment-status.js
environment:
- DEPLOY_CONTEXT=preview/twig-php
when:
branch: master
event: push
deploy-twigphp-preview:
group: previews
image: roelofr/php-node
secrets: [gh_token, netlify_auth_token, netlify_php_site_id]
commands:
- npm install -g n && n stable
- yarn install
- rm -rf netlify.toml
- yarn php:install
- yarn php:dist
- yarn diff
- 'yarn netlify deploy --dir=php/dist --site $${NETLIFY_PHP_SITE_ID} --alias ${DRONE_COMMIT_BRANCH} --message "Drone build: ${CI_BUILD_NUMBER}"'
- node scripts/set-netlify-deployment-status.js
environment:
- DEPLOY_CONTEXT=preview/twig-php
when:
event: push
status: [success, failure]
branch:
exclude:
- master