Build the frontend assets on travis and deploy to S3
This commit is contained in:
parent
820ffc2a40
commit
af553c6ac0
3 changed files with 38 additions and 1 deletions
29
.travis.yml
Normal file
29
.travis.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
language: node_js
|
||||
node_js: 5
|
||||
|
||||
install:
|
||||
- gem install sass
|
||||
- npm install -g babel-cli
|
||||
- npm install babel-preset-es2015 babel-preset-react
|
||||
|
||||
script:
|
||||
- mkdir -p dist/css dist/js
|
||||
- sass scss/all.scss dist/css/all.css
|
||||
- babel -V
|
||||
- babel --presets es2015,react --out-dir dist/js js
|
||||
- mkdir upload
|
||||
- cd dist; zip -r ../upload/dist.zip *; cd -
|
||||
- .travis/echo_sha.sh > upload/data.json
|
||||
|
||||
deploy:
|
||||
provider: s3
|
||||
access_key_id:
|
||||
secure: "LjqvQ2MQj8fbumcnIKZC5wa03s3SIAnaLdOrmi7uRcltKIMko20QluRlpXipmYLdDRBg9sZrGgHJzN2QMZBk29XDsPhnFTG5Mhnaf9Ycxac2dy6FABtarNXjEOSH6Vv+Z96W8NkNTly7Okgyg0lXylTi1rLm/JxW14z+SrDPBOVPx5i4Wemd/y4Qx/5Oy611jaZIC4tExL+KWLCfX6tCgg1iE1vnJ22DAjNVlUOmZrLpuhuz/d/4mgkjtZvHAENDPmTItoN6WXxWPspMuaBaSMsj5OuhXqfro8BygbalWfUN7bSMvCqvO+irC6PBeZ4ntq675fS6g9Xb0vzZ6KnNck40PdHXdZRb4wvseqphCL4Xy9cLgUfND3GhxDtStJlqpMeaCg5Yjd9JknQjfCteObLqVeHyjIbWUNsQlyyQcgrVdAQRQiImG+do5qWQXC/02YqxffGJxW/6iQUC/TqC6vNoTKbMSVlccHExt9wnoooZ8D7MT7oN4BCk8bw+G/momH03hGoI0xffcVM9mN+y4z3/BbDX+bn/H5J2cmGWVFZHcOcbY+ehsTmdcqmm+KeePIpKmP6bD7waSUp+czXMgAgfjlWKuzmOFVxvlTo/rLzj5NlIH35RtIKOoVjU8kHzYI1aWAKIHNTHHrUJp4aVYeYGw5y2oejaHnO0ltmVoog="
|
||||
secret_access_key:
|
||||
secure: "cAWUhKK+2//JBmV2ohcLs3WTDgDWAMK2RxDrwTqUBEeOdAHMRnEVR++a7fzEL+2dcYi939ZaynNXS5JFJANdjIEKmSWDtvyszyl5MWH0xERZtD0K0xs9bNXS8Un6UrTxhaatmQmqx0KokdUmdH5iqB02BBCKLuwGEjMcUVbadXkp+F8Pd4EXmDPbYHQ2eNo87FzQ7dCQ+GOyQBDNM1Orq+hOKiqJOzB9sDWKShsMTeq5Hyb1oji3cAxTyi6niJ/M/46NokLrPT0xrJLxy+sw5k2106SJXyofJsW1UVOsa5Nxx/suJTv2D0E6d7Ei1XYNnkAbDltu1m9wMq2xqLyoxfdvcC7bxr/NcUZ+DTCKcsM5oa8CiL/y+sOpB8ia0CjO3WBebIUWQAhyswQb312rYsbfQXscb5TnheS+wo4Z1MLse7fSm6jzZRZwqGi27GxC7SFWkSkBwHgaQ8tA7mzsdi6DFmz/KrnwgzqzFRkGg9d0RNXVfUN09p0GJr9drVS1DscVYWGhhD1eDKAIEaEd89u0vKF83zLk73UuNVZA38kkERtLwv7Yr1rRdftL3/gt6fMiW//JQB9sRWV0fDfiWbV2vaki6c/0s6moX00UBuZq21FEpx8puylUOwkXNlQK6TH/bw41ikrRMO156njokYOwLgQaebI/Mb0Cwi32gOU="
|
||||
bucket: lbry-ui
|
||||
skip_cleanup: true
|
||||
upload-dir: ${TRAVIS_BRANCH}
|
||||
local_dir: upload
|
||||
on:
|
||||
all_branches: true
|
7
.travis/echo_sha.sh
Executable file
7
.travis/echo_sha.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# this is a script instead of a line in the travis.yml
|
||||
# getting the quoting on this correctly inside the yaml is
|
||||
# unreadable and difficult
|
||||
|
||||
echo '{"sha": "'${TRAVIS_COMMIT}'"}'
|
|
@ -8,7 +8,8 @@ These steps will get you to change-reload-see:
|
|||
|
||||
- Install [LBRY](https://github.com/lbryio/lbry/releases)
|
||||
- Install node and npm ([this gist may be useful](https://gist.github.com/isaacs/579814))
|
||||
- Install babel (`npm install -g babel-cli babel-preset-es2015 babel-preset-react`)
|
||||
- Install babel (`npm install -g babel-cli)
|
||||
- Install babel presets (`npm install babel-preset-es2015 babel-preset-react`)
|
||||
- Install [SASS](http://sass-lang.com/install)
|
||||
- Run ./watch.sh
|
||||
- Run lbrynet-daemon --ui=/full/path/to/dist/
|
||||
|
|
Loading…
Reference in a new issue