From the course: Learning Static Site Building with Hugo

Unlock the full course today

Join today to access over 22,400 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 Hugo

Start my 1-month free trial

Deploy to AWS with Travis CI

- [Instructor] Now that you've set up S3, CloudFront, and an Amazon IM user, you're ready to make the final touches to the deployment script. We'll do that by editing the dot travis dot YML file. The first thing I'm going to do is move this Hugo line up into the before script section. So now before script will be RM dash RF and then on another line dash Hugo. In the script section, we'll replace this with the commands we need to push our files to S3. First I'll do AWL S3 sync. And we'll be syncing the public folder. Public slash, or the build site files to our S3 bucket. So we'll do S3 colon slash slash, and then the bucket name. This is different than the ARN. We actually named the bucket awesomestaticsites.com. Then we'll do dash dash ACL, public dash read dash dash delete. That command will push our build site files up to S3 and delete any previous files that were in that S3 bucket. Now we need to tell CloudFront to create an invalidation. This means that it'll wipe out the cache…

Contents