No description
Find a file
Torbjørn Bang 189e346592
Some checks failed
🐰 Deploy to Bunny.net / 🛠️ Deploy infrastructure (push) Has been cancelled
🐰 Deploy to Bunny.net / 🎨 Deploy site (push) Has been cancelled
🐰 Deploy to Bunny.net / 🚮 Purge cache (push) Has been cancelled
Fixed cache purge.
2025-03-23 08:21:52 +00:00
.github/workflows Fixed cache purge. 2025-03-23 08:21:52 +00:00
infra Corrected variable names. 2025-03-23 08:06:38 +00:00
.gitignore Added terraform configs. Added 'main' branch to trigger deploy workflow. 2025-03-23 01:20:01 +01:00
LICENSE.txt Added license. 2025-03-23 01:32:31 +01:00
README.md Corrected variable names. 2025-03-23 08:06:38 +00:00

Deploy Hugo site to Bunny.net

A simple example of how one can deploy a hugo site with bunny.net storage & CDN. You can read more avout this this in this blog post.

Instructions

  1. Copy the .github/workflows folder and the infra folder into your hugo website repository.

  2. Create the following secret & vars:

  • Secret: BUNNY_KEY, your bunny.net API token
  • Variable: FQDN, the FQDN of your website
  • Variable: STATE_SZ_ID, the ID of an existing storage zone to store your TF state
  1. Verify the functionality of your site at {fqdn with dashes instad of dots}.b-cdn.net

  2. Create an ANAMA/ALIAS record that points towards {fqdn with dashes instad of dots}.b-cdn.net

  3. Enjoy!

Note that this does not encrypt the terraform state. If you end up connecting that storage zone to a pull-zone you will be publishing sensitive data.