Simply Static 1.1 introduced a new alternative to the deployment via GitHub. It supports direct deployment to a CDN, as of now only BunnyCDN is supported, but this list will extend over time.
BunnyCDN is quite a popular choice for a CDN as it combines fair pricing with incredibly good performance and 99.99% availability across the entire globe. It serves your website for a fraction of the costs of a traditional web host and provides also better performance and a lot more security due to the static deployment with Simply Static.
You can create a free account at bunny.net. Once you have on, go to “Account Details” to grab your API key:
Before we head back to the Simply Static settings, let’s move to “Storage Zones” and create one:
Connect Pull Zone
This will take a short moment, but once it’s finished we click on “Connected Pull Zones”, add a name for the new pull zone and save the settings.
Setup in Simply Static
Now we have everything set up in BunnyCDN and we can move back to Simply Static. Head over to Simply Static -> Settings -> Deployment-> BunnyCDN and fill out the details:
Add the API Key and the name of your pull-and storage zone and save the settings. Optionally you can also set a subdirectory where Simply Static should export your static files to.
Changing Delivery Method
The last step is to change the delivery method in Simply Static -> Settings -> General to “CDN”:
That’s it. Now as soon as you run a new static export, Simply Static will push the files to BunnyCDN automatically. Simply Static will also update existing files when you run Build exports or Single Exports.