Automated Deploy with Jekyll, Gulp, Travis CI and GitHub Pages

1. Make .travis.yml file to root

2. Generate Personal access tokens from GitHub website

  1. Click settings menu
  2. Click Personal access tokens menu
  3. Click Generate new token button
    1. Input Token description like travis
    2. Check repo scope

Copy new token to bellow step.

3. Generate secure key to .travis.yml

Install Travis CLI.

Use encrypt command to encrypt data

This command will add secret item to .travis.yml file.

4. Make gulpfile.js file to root

I followed this article to generate gulpfile.js.

5. Make file to root

This will execute npm run build, gulp generate --production and htmlproofer ./public --disable-external --allow-hash-ref command step by step and commits result to gh-pages branch.

6. Exclude file(s) or folder(s) from Jekyll build process

Add necessary file(s) or folder(s) to _config.yml file like bellow. Those files will not be built by Jekyll.

7. Conclusion

You can see running example by repository.



You may also like...

Leave a Reply