mirror of
https://github.com/bigchaindb/site.git
synced 2025-02-14 21:10:28 +01:00
prepare beta deployment task
This commit is contained in:
parent
dad0e6f4b8
commit
aa78a45e13
15
README.md
15
README.md
@ -2,7 +2,7 @@
|
||||
|
||||
> Landing page for www.bigchain.io
|
||||
|
||||
[Live](http://www.bigchain.io) | [Styleguide](http://www.bigchain.io/styleguide/)
|
||||
[Live](https://www.bigchain.io) | [Beta](https://beta.bigchain.io) | [Styleguide](https://www.bigchain.io/styleguide/)
|
||||
|
||||
## Development
|
||||
|
||||
@ -52,6 +52,19 @@ AWS_PROFILE=bigchain gulp deploy:live
|
||||
|
||||
In case that you get authentication errors or need an alternative way to authenticate with AWS, check out the [AWS documentation](http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html).
|
||||
|
||||
### Production build & beta deployment
|
||||
|
||||
```bash
|
||||
# make sure your local npm packages & gems are up to date
|
||||
npm update && bundle update
|
||||
|
||||
# make production build in /_dist
|
||||
gulp build --production
|
||||
|
||||
# deploy contents of /_dist to beta
|
||||
gulp deploy:beta
|
||||
```
|
||||
|
||||
### Production build & live deployment
|
||||
|
||||
```bash
|
||||
|
48
gulpfile.js
48
gulpfile.js
@ -358,3 +358,51 @@ gulp.task('deploy:live', function() {
|
||||
states: ['create', 'update', 'delete']
|
||||
}));
|
||||
});
|
||||
|
||||
gulp.task('deploy:beta', function() {
|
||||
|
||||
// create publisher, define config
|
||||
var publisher = $.awspublish.create({
|
||||
params: {
|
||||
'Bucket': S3BUCKET_BETA
|
||||
},
|
||||
'accessKeyId': process.env.AWS_ACCESS_KEY,
|
||||
'secretAccessKey': process.env.AWS_SECRET_KEY,
|
||||
'region': S3REGION_BETA
|
||||
});
|
||||
|
||||
return gulp.src(DIST + '**/*')
|
||||
.pipe($.awspublishRouter({
|
||||
cache: {
|
||||
// cache for 5 minutes by default
|
||||
cacheTime: 300
|
||||
},
|
||||
routes: {
|
||||
// all static assets, cached & gzipped
|
||||
'^assets/(?:.+)\\.(?:js|css|png|jpg|jpeg|gif|ico|svg|ttf)$': {
|
||||
cacheTime: 2592000, // cache for 1 month
|
||||
gzip: true
|
||||
},
|
||||
|
||||
// every other asset, cached
|
||||
'^assets/.+$': {
|
||||
cacheTime: 2592000 // cache for 1 month
|
||||
},
|
||||
|
||||
// all html files, not cached & gzipped
|
||||
'^.+\\.html': {
|
||||
cacheTime: 0,
|
||||
gzip: true
|
||||
},
|
||||
|
||||
// pass-through for anything that wasn't matched by routes above, to be uploaded with default options
|
||||
"^.+$": "$&"
|
||||
}
|
||||
}))
|
||||
.pipe(parallelize(publisher.publish(), 10))
|
||||
.pipe(publisher.sync()) // delete files in bucket that are not in local folder
|
||||
.pipe(publisher.cache())
|
||||
.pipe($.awspublish.reporter({
|
||||
states: ['create', 'update', 'delete']
|
||||
}));
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user