Travis CI is a very good tool to help you auto-test and auto-deploy.
Log in with Github account, and enable the repository that has your Jekyll site inside.
Travis CI needs
.travis.yml in your repository root to build and deploy the websites.
Below is what I use.
install: gem install jekyll -v 2.4.0 && gem install s3_websiteis to install
s3_websitecan help you push files into AWS S3.
script: jekyll buildis to build the site with Jekyll.
after_success: s3_website pushis to copy everything you have to AWS S3.
s3_website needs a configuration to access your Amazon Web Service account. Simply create a
s3_website.yml in repository root, and copy the code below into that file. Remember to change variables.
s3_id: fdsahfkjhaskjfhdas s3_secret: fjsdafjashfkjdas s3_bucket: weixia.info cloudfront_distribution_id: fdsahjfkadhs
This is the final step to set up environment variables in Travis CI.
Go to your repository setting page, under Environment Variables section, add
cloudfront_distribution_id into name along with their values.
Every time you make any changes and commit them to Github repository, Travis CI will rebuild the sites and deploy it.
This is the end of post