Skip to content

Commit 143ccec

Browse files
author
Tim Hopper
committed
netlify deploy all branches
1 parent 07660bc commit 143ccec

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

.travis.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ before_deploy:
1515
- npm install netlify-cli -g
1616
deploy:
1717
provider: script
18-
script: netlify deploy --auth $NETLIFY_AUTH_TOKEN --site $NETLIFY_SITE_ID --dir ./web
19-
skip_cleanup: true
20-
on:
21-
branch: netlify
18+
script: ./netlify_deploy.sh
19+
skip_cleanup: true

netlify.toml

-7
This file was deleted.

netlify_deploy.sh

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
if [ $TRAVIS_BRANCH = "foo" ]; then
4+
netlify deploy \
5+
--auth $NETLIFY_AUTH_TOKEN \
6+
--site $NETLIFY_SITE_ID \
7+
--dir ./web \
8+
--prod \
9+
--message "Production deploy from Travis CI"
10+
11+
else
12+
netlify deploy \
13+
--auth $NETLIFY_AUTH_TOKEN \
14+
--site $NETLIFY_SITE_ID \
15+
--dir ./web \
16+
--message "Preview deploy from Travis CI"
17+
if

0 commit comments

Comments
 (0)