- How to deploy the site to GitHub Pages?
- How to deploy the site via SCP?
- How to securely store sensitive data in my public repository?
How to deploy the site to GitHub Pages?
Install gulp-gh-pages:
> npm install gulp-gh-pages --save-dev
Edit gulpfile.js file:
gulp.task('deploy', function () {
return gulp.src('build/**')
.pipe($.ghPages(options));
});
How to deploy the site via SCP?
Install gulp-scp:
> npm install gulp-scp --save-dev
Edit gulpfile.js file:
gulp.task('deploy', function () {
return gulp.src('build/**')
.pipe($.scp({
host: '255.255.255.255',
user: 'username',
port: 22,
path: '~/dir'
}));
});
If you're using a public Git repository for your site, you should never embed your passwords and keys as plain text into your source code. Travis CI allows you to store passwords and keys securely by encrypting them with a public key. For more information visit http://docs.travis-ci.com/user/encryption-keys/
If you don't have Ruby installed, you can use Node.js-based [travis-encrypt] (https://www.npmjs.org/package/travis-encrypt) utility to encrypt and save your passwords and keys in .travis.yml file.