Chapter 8
Deploying the Site

Your site is ready for the world to see, and since everything Hugo produces is completely static content, the only requirement you have is an existing web server. At the most basic level, you can take the contents of the public directory and place them in your existing web server’s web root directory.

However, copying the data directly to your web server isn’t the only way to bring your site online quickly; there are other, more automated options. For example, you can use a script that automates pushing your code to a production server, you can use a hosting service with built-in continuous integration, you can transfer your site to cloud storage, or you can use containers to package your site into something you can deploy to a Docker host.

All of these options have their pros and cons. Ultimately, how you deploy your site depends entirely on what you have available—and because this book can’t cover everything—this chapter will cover two specific scenarios and a more general approach.

You’ll start by deploying your site to Netlify,[38] a service that hosts static websites. Netlify is a great option for people who don’t have a background in deployment and want to get things running quickly and securely.

From there, you’ll move on to deploying your site to Amazon’s S3 cloud storage using Hugo’s built-in deploy command. If you’re already familiar with hosting static sites on S3, this is a fantastic option.

Finally, you’ll look at deploying your site to more traditional web hosts like shared hosting providers, cloud servers, or your own internal servers.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.21.39.142