From the course: Learning Static Site Building with Jekyll

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deploy to AWS with Travis CI

Deploy to AWS with Travis CI

From the course: Learning Static Site Building with Jekyll

Start my 1-month free trial

Deploy to AWS with Travis CI

- [Instructor] Now that you've set up S3, CloudFront, and an Amazon IAM user, you're ready to make the final touches to the deployment script. We'll do that in the .travis.yml file. First, I need to move the bundle exec jekyll build line up to the before_script section. I'll just put that up here, - bundle exec jekyll build. Now, in the script section, I'll add the commands to push my build side files up to S3. What that'll look like is aws s3 sync. We'll sync the public folder, which is where our build side files are, public/. And then we'll need to tell it which S3 bucket to sync to, I'll do s3://. In this case the bucket name is awesomestaticsites.com, but in your case it'll be whatever you named your bucket. Then we'll do --acl public -read, and then --delete. This command will sync all of our build side files to S3 and delete any previous existing files on that S3 bucket, so everything's fresh. Now we need to tell CloudFront to create what's called an invalidation. In other…

Contents